javaandroidsdk

what is different between ANDROID_HOME & ANDROID_SDK_HOME


I have 2 directory that look same,

ANDROID_HOME=C:\Android\sdk

ANDROID_SDK_HOME=C:\Users[user]\AppData\Local\Android\Sdk

whats the different? can I set it in one dir?


Solution

  • Based on the documentation:

    ANDROID_HOME

    ANDROID_HOME, points to the SDK installation directory. ANDROID_SDK_ROOT, which also points to the SDK installation directory, is deprecated.

    If you continue to use it, the following rules apply:

    • If ANDROID_SDK_ROOT is defined Android Studio and the Android Gradle plugin will check that the old and new variables are consistent.
    • If ANDROID_SDK_ROOT is not defined, the value in ANDROID_HOME is used.

    ANDROID_SDK_HOME

    The root of the user-specific directory where all configuration and AVD content is stored

    can I set it in one dir?

    Ideally you shouldn't, since they serve different purpose.