Using ccache with Android Studio 2.3

Masakazu Matsushita 09/09/2017. 1 answers, 230 views
android android android-ndk android-ndk ccache android-studio-2.3

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 Answers


Jon N 06/14/2017.

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

Related questions

Hot questions

Language

Popular Tags