com.android.prefs.AndroidLocation$AndroidLocationException: Unable to get the Android SDK home directory. Make sure the environment variable ANDROID_SDK_HOME is set up.

Stack Overflow | The Thom | 3 months ago
  1. 0

    Can't build android app in Jenkins

    Stack Overflow | 3 months ago | The Thom
    com.android.prefs.AndroidLocation$AndroidLocationException: Unable to get the Android SDK home directory. Make sure the environment variable ANDROID_SDK_HOME is set up.

    Root Cause Analysis

    1. 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()
    2. com.android.tools.common
      AndroidLocation.getFolder
      1. com.android.prefs.AndroidLocation.findHomeFolder(AndroidLocation.java:220)
      2. com.android.prefs.AndroidLocation.getFolder(AndroidLocation.java:141)
      2 frames
    3. com.android.tools.sdk-common
      KeystoreHelper.defaultDebugKeystoreLocation
      1. com.android.ide.common.signing.KeystoreHelper.defaultDebugKeystoreLocation(KeystoreHelper.java:84)
      1 frame
    4. com.android.tools.build.builder
      DefaultSigningConfig.initDebug
      1. com.android.builder.signing.DefaultSigningConfig.initDebug(DefaultSigningConfig.java:59)
      1 frame
    5. com.android.tools.build.gradle
      SigningConfig.<init>
      1. com.android.build.gradle.internal.dsl.SigningConfig.<init>(SigningConfig.java:52)
      1 frame