com.android.prefs.AndroidLocation$AndroidLocationException

Unable to get the Android SDK home directory. Make sure the environment variable ANDROID_SDK_HOME is set up.

Samebug tips0

There are no available Samebug tips for this exception. If you know how to solve this issue, help other users by writing a short tip.

Don't give up yet. Paste your full stack trace to get a solution.

Solutions on the web1

  • via Stack Overflow by The Thom
    , 10 months ago
    Unable to get the Android SDK home directory. Make sure the environment variable ANDROID_SDK_HOME is set up.
  • Stack trace

    • com.android.prefs.AndroidLocation$AndroidLocationException: Unable to get the Android SDK home directory. Make sure the environment variable ANDROID_SDK_HOME is set up. at com.android.prefs.AndroidLocation.findHomeFolder(AndroidLocation.java:220) at com.android.prefs.AndroidLocation.getFolder(AndroidLocation.java:141) at com.android.ide.common.signing.KeystoreHelper.defaultDebugKeystoreLocation(KeystoreHelper.java:84) at com.android.builder.signing.DefaultSigningConfig.initDebug(DefaultSigningConfig.java:59) at com.android.build.gradle.internal.dsl.SigningConfig.<init>(SigningConfig.java:52)

    Write tip

    You have a different solution? A short tip here would help you and many other users who saw this issue last week.

    Users with the same issue

    You’re the first here who have seen this exception.