Created
November 16, 2014 00:07
-
-
Save revskill/d0d30a0e867c4cc25098 to your computer and use it in GitHub Desktop.
cordova platform add android not working while listing Android targets
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 : | |
Checking Android requirements... (Error: An error occurred while listing Android targets) | |
I already try to add my android sdk location in the path variable. | |
Please help me ! :D | |
I work on Windows 7 64 bits, i install the android API 17, 18 and 19 with the android SDK. I am on 3.2 phoneGap version. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
To work, this cordova command needs to use some programs located into your sdk/tools directory. You need also have installed apache ant. | |
Then you must add these directories into your PATH system variable: | |
Background: | |
let's assume you have installed your Android SDK to the c:\sdk\android directory | |
you have installed you Apache ant to the c:\tools\apache-ant directory | |
Then you must create two system variables: | |
ANDROID_HOME with the c:\sdk\android value | |
ANT_HOME with the c:\tools\apache-ant value | |
Finally, you must modify the PATH variable and add those two to the end of the PATH' value: | |
;%PATH%\tools;%ANT_HOME%\bin;%ANDROID_HOME%\tools;%ANDROID_HOME%\platform-tools | |
NOTE: for those who uses Linux, the instruction differs a bit. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment