TensorFlow Android Camera Demo编译安装(Ubuntu Trusty 14.04 LTS)


//检查一下android sdk的版本,我的sdk/platform/android-24, so modify as the following
For tensorflow/WORKSPACE

# Uncomment and update the paths in these entries to build the Android demo.
android_sdk_repository(
    name = "androidsdk",
#    api_level = 23,
    api_level = 24,
    build_tools_version = "24.0.1",//如果配置错误,可能报错:ERROR: missing input file '@androidsdk//:platforms/android-23/android.jar'.
    # Replace with path to Android SDK on your system
    path = "/home/marvin/project/Sdk",
)
#
android_ndk_repository(
    name="androidndk",
    path="/home/marvin/project/android-ndk-r11c",
    api_level=21)

export ANDROID_SDK_HOME=/home/marvin/project/Sdk
export ANDROID_NDK_HOME=/home/marvin/project/android-ndk-r11c
export PATH=${ANDROID_NDK_HOME}:${ANDROID_SDK_HOME}/platform-tools:${ANDROID_SDK_HOME}/tools:$PATH


//build命令如下:
bazel build  //tensorflow/examples/android:tensorflow_demo


其他错误:
1. ubuntu卡死一次,起初怀疑是job数目为200过大导致。后来重复编译,没有再发生此类错误。因此,这里的job默认数目在ubuntu14.04上不存在问题。
2. build error     cwise_op_rsqrt. d: File does not end in a newline.  tensorflow

 I tried several times, and the error had no long occured But I didn't any modification.

//构建成功。 

INFO: Found 1 target...
Target //tensorflow/examples/android:tensorflow_demo up-to-date:
  bazel-bin/tensorflow/examples/android/tensorflow_demo_deploy.jar
  bazel-bin/tensorflow/examples/android/tensorflow_demo_unsigned.apk
  bazel-bin/tensorflow/examples/android/tensorflow_demo.apk
INFO: Elapsed time: 56.127s, Critical Path: 31.61s

//adb install  tensorflow_demo.apk. It works.
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值