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

后端 未结 6 1852
野的像风
野的像风 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:54

    First need to set the ANDROID_HOME directory look into your android-sdk-linux(mac) directory and look for 'android' executable file, generally it will exists under 'tools' directory

    so edit your .bashrc from home folder

    and add this line down there

    export ANDROID_HOME=~/android-sdk-linux
    PATH=${PATH}:$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools
    

    Once done, exit your console and run your command again

    You could expect an error saying " Please install Android target "android-19" " if it is not set yet.

    you may fix that running "android" command and selecting "Android 4.4.2 API 19" to install.

    And afterwards, don't forget to give ample permission to directory where the application resides.

提交回复
热议问题