From ddef51c1c93f66989ac7a88b88b89f5b2a9df599 Mon Sep 17 00:00:00 2001 From: jubjamie Date: Thu, 30 Mar 2017 19:04:29 +0100 Subject: [PATCH] Clarify and correct Android Sections in WORKSPACE (#8689) * Clarify and correct Android Sections Build Tools version updated to latest version shipping with Android Studio. Added some comments to clarify both this and NDK Level details that have been causing confusion. * Update Build Tools Version Android studio uses 25.0.2 now (I think) and complains about incorrect bulid tools version in gradle. This fixes it. Not sure if this is unique to my android studio though because I have latest version? * Requested changes to WORKSPACE for Android Clarification of comments to the android section at the top. Comments added to avoid common confusion. * Update Dockerfile.android to clarify build tools. I don't understand this dockerfile too much but I gather that this will download and use the correct build_tools_version regardless? Nonetheless, updated to 25.0.2 as a minimum and added a comment to assist troubleshooters in the future. * Update build_tools_version and add comment Added comment to clarify build_tools_version updates and changed it to 25.0.2 * Update WORKSPACE * Update WORKSPACE * Update Dockerfile.android * Update WORKSPACE * Updated for "the", lines and line wrapping --- WORKSPACE | 8 ++++++-- tensorflow/contrib/android/cmake/build.gradle | 3 ++- tensorflow/examples/android/build.gradle | 2 +- tensorflow/tools/ci_build/Dockerfile.android | 3 ++- 4 files changed, 11 insertions(+), 5 deletions(-) diff --git a/WORKSPACE b/WORKSPACE index 6ec1a7df3ec..cab8389a55c 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -20,7 +20,9 @@ load("//tensorflow:workspace.bzl", "tf_workspace") #android_sdk_repository( # name = "androidsdk", # api_level = 23, -# build_tools_version = "25.0.1", +# # Ensure that you have the build_tools_version below installed in the +# # SDK manager as it updates periodically. +# build_tools_version = "25.0.2", # # Replace with path to Android SDK on your system # path = "", #) @@ -29,7 +31,9 @@ load("//tensorflow:workspace.bzl", "tf_workspace") #android_ndk_repository( # name="androidndk", # path="", -# api_level=14) # This needs to be 14 or higher to compile TensorFlow. +# # This needs to be 14 or higher to compile TensorFlow. +# # Note that the NDK version is not the API level. +# api_level=14) # Please add all new TensorFlow dependencies in workspace.bzl. tf_workspace() diff --git a/tensorflow/contrib/android/cmake/build.gradle b/tensorflow/contrib/android/cmake/build.gradle index fb87de62127..17a57b99fd6 100644 --- a/tensorflow/contrib/android/cmake/build.gradle +++ b/tensorflow/contrib/android/cmake/build.gradle @@ -5,7 +5,8 @@ def TF_SRC_DIR = projectDir.toString() + "/../../../.." android { compileSdkVersion 24 - buildToolsVersion '25.0.1' + // Check local build_tools_version as this is liable to change within Android Studio. + buildToolsVersion '25.0.2' // for debugging native code purpose publishNonDefault true diff --git a/tensorflow/examples/android/build.gradle b/tensorflow/examples/android/build.gradle index ed05a083a9d..4f241027f4b 100644 --- a/tensorflow/examples/android/build.gradle +++ b/tensorflow/examples/android/build.gradle @@ -67,7 +67,7 @@ apply plugin: 'com.android.application' android { compileSdkVersion 23 - buildToolsVersion "25.0.1" + buildToolsVersion "25.0.2" lintOptions { abortOnError false diff --git a/tensorflow/tools/ci_build/Dockerfile.android b/tensorflow/tools/ci_build/Dockerfile.android index 4d46c672ab5..c6679f78826 100644 --- a/tensorflow/tools/ci_build/Dockerfile.android +++ b/tensorflow/tools/ci_build/Dockerfile.android @@ -29,7 +29,8 @@ RUN mkdir -p ${ANDROID_DEV_HOME} ENV ANDROID_SDK_FILENAME tools_r25.2.5-linux.zip ENV ANDROID_SDK_URL https://dl.google.com/android/repository/${ANDROID_SDK_FILENAME} ENV ANDROID_API_LEVEL 23 -ENV ANDROID_BUILD_TOOLS_VERSION 25.0.1 +# Build Tools Version liable to change. +ENV ANDROID_BUILD_TOOLS_VERSION 25.0.2 ENV ANDROID_SDK_HOME ${ANDROID_DEV_HOME}/sdk ENV PATH ${PATH}:${ANDROID_SDK_HOME}/tools:${ANDROID_SDK_HOME}/platform-tools RUN cd ${ANDROID_DEV_HOME} && \ -- GitLab