I'm running npm phonegap -g following this tutorial. Everything is fine, but when I run:
>cordova platform add android
>phonegap build android
I get this error:
[error] Please install Android target 17 (the Android 4.2 SDK). Make sure you
have the latest Android tools installed as well. Run `android` from your comman
d-line to install/update any missing SDKs or tools.
The Android SDK site is using Android 4.4 and API lvl Android 19.
How can I update NPM, PhoneGap, and Cordova to use the latest version of Android?
It's a cordova bug.
1- Replace android-17 for android-19 in android_parser.js file within the cordova module inside npm_modules of your node install.
2- Replace android-17 for android-19 in project.properties in your project.
Not a solution, just a workaround until Cordova release a fixed version.
Change the value of "target" key in C:\Users\UserName\.cordova\lib\android\cordova\3.5.0\framework\project.properties to "android-20", this way:
target=android-20
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With