Error: ANDROID_HOME is not set and “android” command not in your PATH. You must fulfill at least one of these conditions.

前端 未结 22 1006
闹比i
闹比i 2020-11-22 16:16

I\'m trying to install PhoneGap and I\'m getting the following error:

Error: ANDROID_HOME is not set and "android" command not in your PATH. Yo

22条回答
  •  误落风尘
    2020-11-22 16:30

    ANDROID_HOME is deprecated now instead of using ANDROID_HOME use ANDROID_SDK_ROOT

    as per Google android documentation -

    ANDROID_SDK_ROOT sets the path to the SDK installation directory. Once set, the value does not typically change, and can be shared by multiple users on the same machine. ANDROID_HOME, which also points to the SDK installation directory, is deprecated.

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

    • If ANDROID_HOME is defined and contains a valid SDK installation, its value is used instead of the value in ANDROID_SDK_ROOT.
    • If ANDROID_HOME is not defined, the value in ANDROID_SDK_ROOT is used.
    • If ANDROID_HOME is defined but does not exist or does not contain a valid SDK installation, the value in ANDROID_SDK_ROOT is used instead.

    For details follow this Android Documentation link

提交回复
热议问题