cordova platform add android not working while listing Android targets

后端 未结 12 1779
野趣味
野趣味 2020-11-29 16:48

I got problem when i want to add an android platform to my phoneGap application. I got this message in my CLI when i execute the command cordova platform add android :

12条回答
  •  佛祖请我去吃肉
    2020-11-29 17:42

    This problem is usually cause because of PATH variable has not been set for Android SDK.

    export HOME="/home/yourname"
    export ANDROID_HOME="$HOME/android-bundle/sdk/tools"
    export ANDROID_PLATFORM_TOOLS="$HOME/android-bundle/sdk/platform-tools"
    export PATH="$ANDROID_HOME:$ANDROID_PLATFORM_TOOLS:$PATH"
    export ANT_HOME="$HOME/ant"
    export PATH="$PATH:$ANT_HOME/bin"
    

提交回复
热议问题