I want to generate tensorflow lite AAR file using bazel command. According to the tensorflow document Android quick start, I install bazel successfully and then, I set ANDROID_SDK_HOME and ANDROID_NDK_HOME in the system enviroment variables as follows :
ANDROID_SDK_HOME = 'G:\IT\AndroidStudioSdk\AndroidStudio'
ANDROID_NDK_HOME = 'G:\IT\AndroidStudioSdk\AndroidStudio\ndk\android-ndk-r17c'
NOTE: I put my android sdk manually in G drive, because I didn't have enough space in C.
And after that, I configure WORKSPACE using configure.cmd file in my tensorflow root directory (C:\Users\username\tensorflow). But, when I want to build TensorFlow Lite AAR with this command :
I face this Error:
Apparently, bazel cannot find path properly.
The NDK, SDK locations should be expressed using the forward slashes /
instead of back-slashes \
as the path separator symbol. So, in your case:
set ANDROID_SDK_HOME = 'G:/IT/AndroidStudioSdk/AndroidStudio'
set ANDROID_NDK_HOME = 'G:/IT/AndroidStudioSdk/AndroidStudio/ndk/android-ndk-r17c'
And then run the configure.cmd
script to use those values when setting up the Android WORKSPACE.