2016-11-10 36 views
0

我下面這個instruction爲TensorFlow Android相機演示,我在工作區的變化路徑NDK和SDK,現在當我試圖建立APK,使用命令錯誤而試圖建立TensorFlow Android相機演示的APK

$ bazel build //tensorflow/examples/android:tensorflow_demo 

我得到了這樣的錯誤:

enter image description here

我做錯了嗎?如何解決它?

如果我試圖建立APK Android Studio中,我得到這樣的錯誤:

Error:/private/var/tmp/_bazel_Iryna/c541cf0f6f349cf0d7c8d3692096116a/external/protobuf/BUILD:73:1: C++ compilation of rule '@protobuf//:protobuf_lite' failed: sandbox-exec failed: error executing command /usr/bin/sandbox-exec -f /private/var/tmp/_bazel_Iryna/c541cf0f6f349cf0d7c8d3692096116a/bazel-sandbox/a0350092-17a0-44fc-a63c-6321732c52f4-2/sandbox.sb /bin/false -MD -MF ... (remaining 27 argument(s) skipped). 

Error:Execution failed for task ':buildNative'. 
> Process 'command '/usr/local/bin/bazel'' finished with non-zero exit value 1 
+0

這看起來像構建/安裝問題。請在我們的[github](https://www.github.com/tensorflow/tensorflow/issues)頁面提交問題。嘗試使用'--genrule_strategy = standalone'和'--spawn_strategy = standalone'。 – drpng

+0

@drpng如何使用--genrule_strategy = standalone和--spawn_strategy = standalone?如果我在終端打印我得到「命令未找到」 –

+1

我的意思是'bazel生成--genrule_strategy = standalone --spawn_strategy =獨立的// tensorflow/examples/android:tensorflow_demo' – drpng

回答

1

這個確切的錯誤是由事實造成的,我在WORKSPACE沒有取消註釋路徑NDKSDK。欲瞭解更多詳情,請閱讀here

相關問題