Saturday 22 February 2020

Android Studio ERROR: SDK location not found. Define location with sdk.dir in the local.properties file or with an ANDROID_HOME environment variable.

I was trying to import a project and I got the following error when building gradle:

ERROR: SDK location not found. Define location with sdk.dir in the local.properties file or with an ANDROID_HOME environment variable.

Solution:
- Find the file local.properties in ./app folder where gradle files like build and build.gradle live.
- Copy your local.properties file to the folder to the root folder where the project is stored.

ref:
https://stackoverflow.com/questions/27620262/sdk-location-not-found-define-location-with-sdk-dir-in-the-local-properties-fil