在UBuntu中构建Android演示时遇到错误

时间:2016-08-29 23:32:12

标签: java android linux python-2.7 android-studio

我正在尝试构建描述here的Android演示。

我不断收到以下错误的变体。我尝试过更改api级别以及手动将某些文件复制到文件夹中。

如何解决错误?提前谢谢。

my@my:~/tensorflow$ bazel build //tensorflow/examples/android:tensorflow_demo
WARNING: Bazel Android NDK crosstools are based on Android NDK revision 11. The revision of the Android NDK given in android_ndk_repository rule 'androidndk' is '12.1.2977051'.
WARNING: /home/my/tensorflow/tensorflow/core/BUILD:646:12: in srcs attribute of cc_library rule //tensorflow/core:android_tensorflow_lib_lite: please do not import '//tensorflow/core/debug:debug_graph_utils.cc' directly. You should either move the file to this package or depend on an appropriate rule there.
WARNING: /home/my/tensorflow/tensorflow/core/BUILD:646:12: in srcs attribute of cc_library rule //tensorflow/core:android_tensorflow_lib_lite: please do not import '//tensorflow/core/debug:debug_graph_utils.h' directly. You should either move the file to this package or depend on an appropriate rule there.
WARNING: /home/my/tensorflow/tensorflow/core/BUILD:646:12: in srcs attribute of cc_library rule //tensorflow/core:android_tensorflow_lib_lite: please do not import '//tensorflow/core/kernels:avgpooling_op.h' directly. You should either move the file to this package or depend on an appropriate rule there.
WARNING: /home/my/tensorflow/tensorflow/core/BUILD:646:12: in srcs attribute of cc_library rule //tensorflow/core:android_tensorflow_lib_lite: please do not import '//tensorflow/core/kernels:bounds_check.h' directly. You should either move the file to this package or depend on an appropriate rule there.
WARNING: /home/my/tensorflow/tensorflow/core/BUILD:646:12: in srcs attribute of cc_library rule //tensorflow/core:android_tensorflow_lib_lite: please do not import '//tensorflow/core/kernels:eigen_activations.h' directly. You should either move the file to this package or depend on an appropriate rule there.
WARNING: /home/my/tensorflow/tensorflow/core/BUILD:646:12: in srcs attribute of cc_library rule //tensorflow/core:android_tensorflow_lib_lite: please do not import '//tensorflow/core/kernels:eigen_attention.h' directly. You should either move the file to this package or depend on an appropriate rule there.
WARNING: /home/my/tensorflow/tensorflow/core/BUILD:646:12: in srcs attribute of cc_library rule //tensorflow/core:android_tensorflow_lib_lite: please do not import '//tensorflow/core/kernels:eigen_backward_cuboid_convolutions.h' directly. You should either move the file to this package or depend on an appropriate rule there.
WARNING: /home/my/tensorflow/tensorflow/core/BUILD:646:12: in srcs attribute of cc_library rule //tensorflow/core:android_tensorflow_lib_lite: please do not import '//tensorflow/core/kernels:eigen_backward_spatial_convolutions.h' directly. You should either move the file to this package or depend on an appropriate rule there.
WARNING: /home/my/tensorflow/tensorflow/core/BUILD:646:12: in srcs attribute of cc_library rule //tensorflow/core:android_tensorflow_lib_lite: please do not import '//tensorflow/core/kernels:eigen_cuboid_convolution.h' directly. You should either move the file to this package or depend on an appropriate rule there.
WARNING: /home/my/tensorflow/tensorflow/core/BUILD:646:12: in srcs attribute of cc_library rule //tensorflow/core:android_tensorflow_lib_lite: please do not import '//tensorflow/core/kernels:eigen_patch_3d.h' directly. You should either move the file to this package or depend on an appropriate rule there.
WARNING: /home/my/tensorflow/tensorflow/core/BUILD:646:12: in srcs attribute of cc_library rule //tensorflow/core:android_tensorflow_lib_lite: please do not import '//tensorflow/core/kernels:eigen_pooling.h' directly. You should either move the file to this package or depend on an appropriate rule there.
WARNING: /home/my/tensorflow/tensorflow/core/BUILD:646:12: in srcs attribute of cc_library rule //tensorflow/core:android_tensorflow_lib_lite: please do not import '//tensorflow/core/kernels:eigen_softmax.h' directly. You should either move the file to this package or depend on an appropriate rule there.
WARNING: /home/my/tensorflow/tensorflow/core/BUILD:646:12: in srcs attribute of cc_library rule //tensorflow/core:android_tensorflow_lib_lite: please do not import '//tensorflow/core/kernels:eigen_spatial_convolutions.h' directly. You should either move the file to this package or depend on an appropriate rule there.
WARNING: /home/my/tensorflow/tensorflow/core/BUILD:646:12: in srcs attribute of cc_library rule //tensorflow/core:android_tensorflow_lib_lite: please do not import '//tensorflow/core/kernels:maxpooling_op.h' directly. You should either move the file to this package or depend on an appropriate rule there.
WARNING: /home/my/tensorflow/tensorflow/core/BUILD:646:12: in srcs attribute of cc_library rule //tensorflow/core:android_tensorflow_lib_lite: please do not import '//tensorflow/core/kernels:ops_util.cc' directly. You should either move the file to this package or depend on an appropriate rule there.
WARNING: /home/my/tensorflow/tensorflow/core/BUILD:646:12: in srcs attribute of cc_library rule //tensorflow/core:android_tensorflow_lib_lite: please do not import '//tensorflow/core/kernels:ops_util.h' directly. You should either move the file to this package or depend on an appropriate rule there.
WARNING: /home/my/tensorflow/tensorflow/core/BUILD:646:12: in srcs attribute of cc_library rule //tensorflow/core:android_tensorflow_lib_lite: please do not import '//tensorflow/core/kernels:pooling_ops_common.cc' directly. You should either move the file to this package or depend on an appropriate rule there.
WARNING: /home/my/tensorflow/tensorflow/core/BUILD:646:12: in srcs attribute of cc_library rule //tensorflow/core:android_tensorflow_lib_lite: please do not import '//tensorflow/core/kernels:pooling_ops_common.h' directly. You should either move the file to this package or depend on an appropriate rule there.
WARNING: /home/my/tensorflow/tensorflow/core/BUILD:646:12: in srcs attribute of cc_library rule //tensorflow/core:android_tensorflow_lib_lite: please do not import '//tensorflow/core/util/ctc:ctc_beam_entry.h' directly. You should either move the file to this package or depend on an appropriate rule there.
WARNING: /home/my/tensorflow/tensorflow/core/BUILD:646:12: in srcs attribute of cc_library rule //tensorflow/core:android_tensorflow_lib_lite: please do not import '//tensorflow/core/util/ctc:ctc_beam_scorer.h' directly. You should either move the file to this package or depend on an appropriate rule there.
WARNING: /home/my/tensorflow/tensorflow/core/BUILD:646:12: in srcs attribute of cc_library rule //tensorflow/core:android_tensorflow_lib_lite: please do not import '//tensorflow/core/util/ctc:ctc_beam_search.h' directly. You should either move the file to this package or depend on an appropriate rule there.
WARNING: /home/my/tensorflow/tensorflow/core/BUILD:646:12: in srcs attribute of cc_library rule //tensorflow/core:android_tensorflow_lib_lite: please do not import '//tensorflow/core/util/ctc:ctc_decoder.h' directly. You should either move the file to this package or depend on an appropriate rule there.
WARNING: /home/my/tensorflow/tensorflow/core/BUILD:646:12: in srcs attribute of cc_library rule //tensorflow/core:android_tensorflow_lib_lite: please do not import '//tensorflow/core/util/ctc:ctc_loss_util.h' directly. You should either move the file to this package or depend on an appropriate rule there.
INFO: Found 1 target...
ERROR: missing input file '@androidsdk//:platforms/android-23/android.jar'.
ERROR: /home/my/tensorflow/tensorflow/examples/android/BUILD:47:1: //tensorflow/examples/android:tensorflow_demo: missing input file '@androidsdk//:platforms/android-23/android.jar'.
Target //tensorflow/examples/android:tensorflow_demo failed to build
Use --verbose_failures to see the command lines of failed build steps.
ERROR: /home/my/tensorflow/tensorflow/examples/android/BUILD:47:1 1 input file(s) do not exist.
INFO: Elapsed time: 0.105s, Critical Path: 0.01s

1 个答案:

答案 0 :(得分:1)

确保实际下载了必要的SDK平台。只安装SDK管理器本身就不会那样做。

编辑:如果您使用的是Android Studio,请转到工具 - > Android - > SDK Manager - >外观&行为 - >系统设置 - > SDK平台。

从那里,您可以点击您需要下载的任何API级平台的复选框,然后一定要点击申请。