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

后端 未结 6 1872
野的像风
野的像风 2020-12-31 05:01

I am MAC OS X Yosemite I have done all the export tutorial to set the android_home but non of it working for me

6条回答
  •  不知归路
    2020-12-31 05:57

    Make sure the env variable you exported is ANDROID_HOME and not android_home (case sensitive).

    After you export, test it by typing

    > echo $ANDROID_HOME
    

    The result should point to the dir where you installed the SDK.

    Last but not least edit your /etc/paths to add dirs $ANDROID_HOME/platform-tools or /Users/abdi/adt/sdk/platform-tools and $ANDROID_HOME/tools or /Users/abdi/adt/sdk/tools to the list. Save file. You might need to edit this file as admin if need be. Close terminal and then Open new terminal. Then type

    > echo $PATH
    

    to check if the path is updated.

    And then voila, when you type

    > which android
    

    you should see the correct path to the binary returned which in your case is /Users/abdi/adt/sdk/tools/android. you should be all set now.

提交回复
热议问题