cordova platform add android not working while listing Android targets

后端 未结 12 1767
野趣味
野趣味 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:28

    Run the "android" command from your adt\sdk\tools folder and install the latest Tools and SDK. Also make sure your PATH has the right variables.

    For this you will need ANT to be installed , a JAVA JDK and an Android SDK installed

    JAVA_HOME (C:\Program Files\Java\jdk)

    ANT_HOME ({ant location}\apache\apache-ant)

    ANDROID_HOME ({android sdk location}\android-sdk)

    Add these to your PATH variable like %ANT_HOME%/bin;%ANDROID_HOME%\tools;%ANDROID_HOME%\platform-tools;%JAVA_HOME%\bin

    Close and re-open your cmd and run your command again.

    Similiar to PhoneGap/Cordova Android Development

提交回复
热议问题