This is in my ~/.bash_profile, since I need Android Studio / Gradle to have access to this variable.
#CCACHE
export USE_CCACHE=1
export NDK_CCACHE=/usr/local/bin/ccache
launchctl setenv NDK_CCACHE $NDK_CCACHE
Interestingly, the variable is not set the first time I start Android Studio, but is always set the second time.
What am I doing wrong that it does not work all the time / the first time already?