Tensorflow Lite 编译demo时报错 ERROR: missing input file

来源:互联网 发布:陈震老婆淘宝店叫什么 编辑:程序博客网 时间:2024/05/16 17:33

Tensorflow Lite 编译demo时报错,这些都是坑

错误一
ERROR: missing input file ‘@androidsdk//:build-tools/27.0.2/aapt’

ERROR:/home/xx/.cache/bazel/_bazel_di/0c60e5cf6a2b1bd6f8f12b5ea9e6433c/external/androidsdk/com.android.support/BUILD:3902:1: @androidsdk//com.android.support:support-core-utils-25.2.0: missing input file ‘@androidsdk//:build-tools/27.0.2/aapt’
Target //tensorflow/contrib/lite/java/demo/app/src/main:TfLiteCameraDemo failed to build
Use –verbose_failures to see the command lines of failed build steps.

ERROR:/home/xx/.cache/bazel/_bazel_di/0c60e5cf6a2b1bd6f8f12b5ea9e6433c/external/androidsdk/com.android.support/BUILD:3902:1 1 input file(s) do not exist

INFO: Elapsed time: 25.934s, Critical Path: 4.91s
FAILED: Build did NOT complete successfully

解决方案:
修改或者拷贝build-tools里面的文件夹名称android-8.1.0为27.0.2(视使用的版本而定)

错误二
ERROR: /home/di/workspace/tensorflow/tensorflow/contrib/lite/java/demo/app/src/main/BUILD:5:1: no such package ‘@androidsdk//com.android.support’: Android SDK api level 23 was requested but it is not installed in the Android SDK at /home/di/app/adt-bundle-linux-x86_64/sdk. The api levels found were [20]. Please choose an available api level or install api level 23 from the Android SDK Manager. and referenced by ‘//tensorflow/contrib/lite/java/demo/app/src/main:TfLiteCameraDemo’

ERROR: /home/di/workspace/tensorflow/tensorflow/contrib/lite/java/demo/app/src/main/BUILD:5:1: no such package ‘@androidsdk//com.android.support’: Android SDK api level 23 was requested but it is not installed in the Android SDK at /home/xx/adt-bundle-linux-x86_64/sdk. The api levels found were [20]. Please choose an available api level or install api level 23 from the Android SDK Manager. and referenced by ‘//tensorflow/contrib/lite/java/demo/app/src/main:TfLiteCameraDemo’

ERROR: Analysis of target ‘//tensorflow/contrib/lite/java/demo/app/src/main:TfLiteCameraDemo’ failed; build aborted: no such package ‘@androidsdk//com.android.support’: Android SDK api level 23 was requested but it is not installed in the Android SDK at /home/xx/adt-bundle-linux-x86_64/sdk. The api levels found were [20]. Please choose an available api level or install api level 23 from the Android SDK Manager.
INFO: Elapsed time: 0.579s
FAILED: Build did NOT complete successfully (13 packages loaded)

解决方案
platforms明明有api level为23的sdk,但是还是会出现这种错误,将platforms中文件夹名称android-6.0 改为 android-23(视sdk版本而定,android 6.0对应 api level 23)

阅读全文
0 0
原创粉丝点击