4

Does anyone know how to use cacche for NDK build from Android Studio 2.3 ?

When I built my Android application from command line, it works fine and all compiled files are cached correctly.

./gradlew assembleDebug

$ ps ax | grep ndk

/usr/local/bin/ccache /usr/local/Cellar/android-ndk/r12b/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64/bin/arm-linux-androideabi-g++ -MMD -MP -MF ...

But built from Android Studio, it doesn't use ccache.

$ ps ax | grep ndk

/usr/local/Cellar/android-ndk/r12b/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64/bin/arm-linux-androideabi-g++ -MMD -MP -MF 

1 Answers1

1

On a mac, try starting from the command line, with forcing the environmnent var to be set:

   cd /Applications/Android\ Studio.app/Contents/MacOS/
   env NDK_CCACHE=/usr/local/bin/ccache ./studio
Jon N
  • 1,439
  • 1
  • 18
  • 29