view raw
Rajkiran Rajkiran - 6 months ago 49
Android Question

Android: set sdk.dir in to ANDROID_HOME environment variable

So the
file holds the reference to the Android SDK directory in
variable. For me it is
. On my CI machine, the
refers to the SDK directory which points to an invalid location since the username is different.

Is there any way so that I can set SDK directory as my

Perhaps something like this:
, so that on my CI machine, it will set the SDK directory from the environment variable?

Answer should not be part of the versioned code. It's used as your local project configuration and Android Studio will create it based on on ANDROID_HOME if it doesn't exist yet.

If is not available, Gradle will use ANDROID_HOME automatically.

If is available, Gradle will use this file having a wrong sdk.dir set and fail.