Uploaded image for project: 'Apache Cordova'
  1. Apache Cordova
  2. CB-11833

versionCode is no longer altered by build.gradle, breaking version continuity

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Won't Fix
    • 5.2.1
    • None
    • cordova-android
    • Android 6.0/Mac OS X

    Description

      Previous versions of the build.gradle file contained this line in the defaultConfig:

      versionCode cdvVersionCode ?: Integer.parseInt("" + privateHelpers.extractIntFromManifest("versionCode") + "0")

      The new Cordova version leaves out the '+ "0" ', which is breaking the continuity of version numbers in our application. When we attempt to install a new version without the edited versionCode,we receive this error:

      09-09 12:20:39.795 1248-1274/? W/PackageManager: Downgrade detected: Update version code 30400 is older than current 303010
      09-09 12:20:39.919 21984-21984/? D/InstallAppProgress: Installation error code: -25

      New builds will inevitably be "older" than the previously built version numbers with the '0' appended to the end. Why this has not been reported until now, I don't understand. For now I fix this by editing the build.gradle file back to the way it was before this Cordova release.

      Note: this is actually affecting version 5.2.2 on Android, but I was unable to choose 5.2.2 from the pulldown menu.

      Attachments

        Activity

          People

            Unassigned Unassigned
            swarrenvcc Stephen Warren
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - 168h
                168h
                Remaining:
                Remaining Estimate - 168h
                168h
                Logged:
                Time Spent - Not Specified
                Not Specified