cordova-android icon indicating copy to clipboard operation
cordova-android copied to clipboard

Updating application version in config.xml with edit-config on AndroidManifest /manifest

Open l-deniau opened this issue 6 years ago • 1 comments

Bug Report

Problem

What is expected to happen?

android:versionCode & android:versionName in AndroidManifest.xml updated with cordova build android with config.xml :

<widget ... version="X.X.X+1" ...

with also an edit-config on the AndroidManifest.xml like this :

<platform name="android">
    <edit-config file="AndroidManifest.xml" mode="merge" target="/manifest">
        <manifest xmlns:tools="http://schemas.android.com/tools" />
    </edit-config>

What does actually happen?

android:versionCode & android:versionName in AndroidManifest.xml are not updated with cordova build android with the edit-config showed above in the config.xml.

When i remove the android platform and recreate it, android:versionCode & android:versionName are correctly created. (this is what i want to avoid...)

When i remove the edit-config showed above, it works. android:versionCode & android:versionName are correctly updated.

Information

Command or Code

cordova build android

Environment, Platform, Device

<engine name="android" spec="6.3.0" />

Version information

8.1.2 ([email protected])

Checklist

  • [X] I searched for existing GitHub issues
  • [X] I updated all Cordova tooling to most recent version
  • [X] I included all the necessary information above

l-deniau avatar Jun 06 '19 13:06 l-deniau

<engine name="android" spec="6.3.0" />

Current version of Cordova Android is 8.0.0. You should try that (and the current CLI 9.0.0 as well) and see if it was fixes in one of those updates.

janpio avatar Jun 06 '19 14:06 janpio

closing since there was no response to the comment about using a more up to date version, if the issue is still present in cordova-android 12, please, report a new issue and provide a sample app where the issue can be reproduced

jcesarmobile avatar Dec 03 '23 00:12 jcesarmobile