Reputation: 16191
So the local.properties
file holds the reference to the Android SDK directory in sdk.dir
variable. For me it is sdk.dir=/Users/rajkiran/Library/Android/sdk
. On my CI machine, the sdk.dir
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 ANDROID_HOME
?
Perhaps something like this: sdk.dir=$ANDROID_HOME
, so that on my CI machine, it will set the SDK directory from the environment variable?
Upvotes: 2
Views: 21924
Reputation: 39863
local.properties 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 local.properties is not available, Gradle will use ANDROID_HOME
automatically.
If local.properties is available, Gradle will use this file having a wrong sdk.dir
set and fail.
Upvotes: 12