Where does local.properties go for android project?

Viewed 106574

Getting this complaint from IntelliJ 13:

8:15:48 PM Gradle '<project>' project refresh failed:
           SDK location not found. Define location with sdk.dir in the local.properties file or with an ANDROID_HOME environment variable.
           Build file '/<project>/build.gradle' line: 20
           : Gradle settings

I have tried to spam my local.properties in every directory I can think of but still getting this error. What gives?

3 Answers

For MAC create file local.properties inside android/ and paste this line inside the file

sdk.dir = /Users/USERNAME/Library/Android/sdk

For MacOS, put your file gradle.properties in these 2 places:

  1. ~/.gradle/
  2. /Users/<your_user>/Library/sdk/
Related