diff options
author | 2017-11-28 21:45:51 -0800 | |
---|---|---|
committer | 2017-11-28 21:49:08 -0800 | |
commit | a7c13b33d6df91e25fc793043bf748b30e311c73 (patch) | |
tree | dded4eda07f5607ece57a535a2a5dc10d69bf846 | |
parent | 2ab7e9dad284bd15d69779ee0bcf8a2c894c2a2a (diff) |
Update TF Android build instructions to warn about NDK 16
See https://github.com/bazelbuild/bazel/issues/4068
PiperOrigin-RevId: 177264756
-rw-r--r-- | tensorflow/contrib/lite/java/demo/README.md | 8 | ||||
-rw-r--r-- | tensorflow/examples/android/README.md | 8 |
2 files changed, 15 insertions, 1 deletions
diff --git a/tensorflow/contrib/lite/java/demo/README.md b/tensorflow/contrib/lite/java/demo/README.md index 71b633c577..5d13a798e2 100644 --- a/tensorflow/contrib/lite/java/demo/README.md +++ b/tensorflow/contrib/lite/java/demo/README.md @@ -8,7 +8,12 @@ It's easiest with Android Studio. - You'll need at least SDK version 23. + - Make sure to install the latest version of Bazel. Some distributions + ship with Bazel 0.5.4, which is too old. - Bazel requires Android Build Tools `26.0.1` or higher. + - **Bazel is incompatible with NDK revisions 15 and above,** with revision + 16 being a compile-breaking change. [Download an older version manually + instead of using the SDK Manager.](https://github.com/tensorflow/tensorflow/tree/master/tensorflow/examples/android#install-bazel-and-android-prerequisites) - You also need to install the Android Support Repository, available through Android Studio under `Android SDK Manager -> SDK Tools -> Android Support Repository`. @@ -19,7 +24,8 @@ - Make sure the `api_level` in `WORKSPACE` is set to an SDK version that you have installed. - By default, Android Studio will install the SDK to `~/Android/Sdk` and - the NDK to `~/Android/Sdk/ndk-bundle`. + the NDK to `~/Android/Sdk/ndk-bundle` (but the NDK should be a manual + download until Bazel supports NDK 16. See bullet points under (1)). 2. Build the app with Bazel. The demo needs C++11: diff --git a/tensorflow/examples/android/README.md b/tensorflow/examples/android/README.md index 79202a38d7..881a975e60 100644 --- a/tensorflow/examples/android/README.md +++ b/tensorflow/examples/android/README.md @@ -126,6 +126,10 @@ the Android NDK and SDK must be installed on your system. 2. The Android NDK is required to build the native (C/C++) TensorFlow code. The current recommended version is 14b, which may be found [here](https://developer.android.com/ndk/downloads/older_releases.html#ndk-14b-downloads). + + * NDK 16, the revision released in November 2017, is **incompatible** with + Bazel. See [here](https://github.com/tensorflow/tensorflow/issues/14918). + 3. The Android SDK and build tools may be obtained [here](https://developer.android.com/tools/revisions/build-tools.html), or alternatively as part of [Android @@ -133,6 +137,10 @@ the Android NDK and SDK must be installed on your system. 23 is required to build the TF Android demo (though it will run on API >= 21 devices). + - The Android Studio SDK Manager's NDK installer will install the latest + revision of the NDK, which is **incompatible** with Bazel. You'll need + to download an older version manually, as (2) suggests. + ##### Edit WORKSPACE The Android entries in |