I am currently using Cordova 3.4.0 and the CLI to build my project to target android using the command:
cordova build android
OR
cordova build android --release
My config.xml has the following specified:
<widget id="com.example.myapp"
version="0.0.3"
versionCode="2"
...
>
</widget>
The resulting AndroidManifest.xml in myapp/platforms/android does not get updated with the version and version code specified in config.xml. It stays as the default:
<manifest
android:versionCode="1"
android:versionName="1.0"
...
</manifest>
Is this a bug? Or is there some other way I should specify the versionCode and versionName for Android in the config.xml? Even maybe, is there a hook I can use to update AndroidManifest.xml with the correct version before build?
I would rather not have to update this manually each time I want it to change as:
For these reasons I would like the version numbers to be set in the config.xml. Any ideas?
Thanks
At last with Cordova 3.5.0-0.2.4
I added this attribute to the <widget>
node config.xml
android-versionCode="10"
and the AndroidManifest.xml
was properly updated to
android:versionCode="10"