Issue 1:
I installed CPU-only Tensorflow version 1.0 on Windows using the pip installer. I am trying to get the Android example to run using CMake as explained in https://github.com/tensorflow/tensorflow/tree/master/tensorflow/contrib/android/cmake. I cloned the newest version of the tensorflow repository and created a new Android studio project and followed the instructions from the webpage above by modifying the gradle files. I already found out that it should be

debugCompile project(path: ':TensorFlow-Android-Inference', configuration: 'debug') releaseCompile project(path: ':TensorFlow-Android-Inference', configuration: 'release')

instead of

debugCompile project(path: ':tensorflow_inference', configuration: 'debug') releaseCompile project(path: ':tensorflow_inference', configuration: 'release')

Now, however, I get a build error stating "Error:Project :app declares a dependency from configuration 'releaseCompile' to configuration 'release' which is not declared in the descriptor for project :TensorFlow-Android-Inference."

Has anyone tried this or could anyone point me to a proper explanation of how to use cMake to build the project.

Any help would be very much appreciated. Thanks.

Issue 2:
What related GitHub issues or StackOverflow threads have you found by searching the web for your problem?

#6101

#6383

http://stackoverflow.com/questions/40978859/creating-simple-android-app-using-android-studio-and-tensorflow

Environment info

Operating System: Windows

Installed version of CUDA and cuDNN:

(please attach the output of ls -l /path/to/cuda/lib/libcud*):

Cuda 8.0

cuDNN 5.0

If installed from source, provide

The commit hash (git rev-parse HEAD)

I downloaded the latest ZIP on 18 Dec 2016. Sorry, I have no idea how to get the version.

The output of bazel version

Build label: 0.4.2

Build target: bazel-out/local-fastbuild/bin/src/main/java/com/google/devtools/build/lib/bazel/BazelServer_deploy.jar

Build time: Wed Dec 7 18:47:13 2016 (1481136433)

Build timestamp: 1481136433

Build timestamp as int: 1481136433

My goal is to build an Android App which loads pre-trained TensorFlow model and runs it on an Android device. I am working on Android Studio on Windows. Unfortunately using Android Studio on Linux is currently not an option.

Following previous advice from this forum, I am trying to build an Android example using Bazel on Windows.

I've successfully installed Bazel using Chocolatey.

Following the build instructions, I changed the SDK and NDK paths in WORKSPACE file and ran:

bazel build //tensorflow/examples/android:tensorflow_demo

So far I did the following to fix errors:

copied aapt.exe to aapt, zipalign.exe to zipalign, since their name is different on Windows/Linux

installed using pacman gcc

But I am stuck again. I am getting the following error which I have no idea how to fix:

ERROR: C:/Users/Andrey/AppData/Local/Temp/_bazel_Andrey/gd3-gSwg/external/protobuf/BUILD:73:1: C++ compilation of rule '@protobuf//:protobuf_lite' failed: arm-linux-androideabi-gcc failed: error executing command external/androidndk/ndk/toolchains/arm-linux-androideabi-4.9/prebuilt/windows-x86_64/bin/arm-linux-androideabi-gcc -fstack-protector-strong -fpic -ffunction-sections -funwind-tables ... (remaining 44 argument(s) skipped): com.google.devtools.build.lib.shell.BadExitStatusException: Process exited with status 1.
external/protobuf/src/google/protobuf/stubs/structurally_valid.cc:588:1: fatal error: opening dependency file bazel-out/android-arm-linux-androideabi-4.9-v7a-gnu-libstdcpp-fastbuild/bin/external/protobuf/_objs/protobuf_lite/external/protobuf/src/google/protobuf/stubs/structurally_valid.d: No such file or directory
} // namespace google
^
compilation terminated.
ERROR: C:/Tools/tensorflow-master/tensorflow/examples/android/BUILD:58:1: output 'tensorflow/examples/android/tensorflow_demo_symbols/R.txt' was not created.
ERROR: C:/Tools/tensorflow-master/tensorflow/examples/android/BUILD:58:1: output 'tensorflow/examples/android/tensorflow_demo.srcjar' was not created.
ERROR: C:/Tools/tensorflow-master/tensorflow/examples/android/BUILD:58:1: output 'tensorflow/examples/android/proguard/tensorflow_demo/_tensorflow_demo_proguard.cfg' was not created.
ERROR: C:/Tools/tensorflow-master/tensorflow/examples/android/BUILD:58:1: output 'tensorflow/examples/android/tensorflow_demo_processed_manifest/AndroidManifest.xml' was not created.
ERROR: C:/Tools/tensorflow-master/tensorflow/examples/android/BUILD:58:1: output 'tensorflow/examples/android/tensorflow_demo_files/resource_files.zip' was not created.
ERROR: C:/Tools/tensorflow-master/tensorflow/examples/android/BUILD:58:1: output 'tensorflow/examples/android/tensorflow_demo.ap_' was not created.
ERROR: C:/Users/Andrey/AppData/Local/Temp/_bazel_Andrey/gd3-gSwg/external/protobuf/BUILD:73:1: output 'external/protobuf/_objs/protobuf_lite/external/protobuf/src/google/protobuf/stubs/stringprintf.o' was not created.
ERROR: C:/Users/Andrey/AppData/Local/Temp/_bazel_Andrey/gd3-gSwg/external/protobuf/BUILD:73:1: output 'external/protobuf/_objs/protobuf_lite/external/protobuf/src/google/protobuf/arenastring.o' was not created.
ERROR: C:/Users/Andrey/AppData/Local/Temp/_bazel_Andrey/gd3-gSwg/external/protobuf/BUILD:113:1: output 'external/protobuf/_objs/protobuf/external/protobuf/src/google/protobuf/io/strtod.o' was not created.
ERROR: C:/Users/Andrey/AppData/Local/Temp/_bazel_Andrey/gd3-gSwg/external/protobuf/BUILD:73:1: output 'external/protobuf/_objs/protobuf_lite/external/protobuf/src/google/protobuf/repeated_field.o' was not created.
Target //tensorflow/examples/android:tensorflow_demo failed to build
Use --verbose_failures to see the command lines of failed build steps.
INFO: Elapsed time: 4.722s, Critical Path: 1.16s

Please advice how to proceed?

Isn't there an easier way to achieve what I want? I just need pre-built TensorFlow binaries for Android Studio on Windows, to build an example application. So far I found only pre-built Python distribution and Bazel installation on Windows