While experienced with phonegap and xcode, I\'m new to android. I have installed phonegap 3.0 ...
npm install phonegap
phonegap --version
3.0.0-0.14.3
PhoneGap Build now supports an option to set the Android SDK version. It is documented here but basically what you need in config.xml is:
<preference name="android-targetSdkVersion" value="18" />
It will then set the property correctly in AndroidManifest.xml.
Note: This supposedly only works for PhoneGap build, but I am using the Ionic command line tools (on Cordova 5.1.1) and it appears to work fine for me too.
I had installed cordova through npm, therefore to make it work I modified target
in
~/.cordova/lib/npm_cache/cordova-android/3.6.3/package/framework/project.properties
You are in the wrong place guys
YOU SHOULD TRY THIS: phonegap local build android
this will add the android to your platforms folder...
If anyone gets here using cordova and/or chrome mobile app toolchain. I edited platforms/android/project.properties
directly to target=android-19
and it built.
cheers
Make sure you have the latest version:
sudo npm update -g phonegap
brew update android-sdk
Then run aandroid
, and download the latest API.
Then PhoneGap will use the latest API by default when running phonegap build android
.
If you need to update a current project, run inside the project folder:
phonegap platform update android
And now if you run build
again, it should use the latest version.