Mac 下出现Gradle sync failed: SDK location not found. Define location with sdk.dir in the local.propert

Mac 下出现Gradle sync failed: SDK location not found. Define location with sdk.dir in the local.properties

I checked that the environment variables and local.properties have already set the sdk path. Later, I googled and found that the Mac needs to be executed.

launchctl setenv ANDROID_HOME /Users/xxx/Documents/ProgramFiles/adt-eclipse/sdk

Then restart android studio and it's fine

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326520808&siteId=291194637