Ionic Play Store upload error (Version 1)

Hi guys, I have an ionic project and have been working on it from the past one year. I also have uploaded my apps on Play Store and they all are working great. I have also constantly updated my cordova, ionic SDK versions up to date. Currently I have the latest Cordova v6.3.1, Ionic v1.7.16 (since my project is completely on Ionic version 1), Node v4.4.5 and NPM v2.15.5.

Recently I tried to load a fresh new versions of platforms and plugins, which I had no issues getting done with (I just removed the old platforms using cordova platform rm android and cordova plugin rm cordova-plugin-xxx , but when I tried uploading my new release build on the Play Store it threw error. Why is this happening and how do I fix it? Am I missing something here? When I added new platforms it also added new version of build.gradle and I think this is what is causing the problem.

I did a short debug and I found that all my earlier versions had 6-digit version code (in AndroidManifest.xml). For example if my version in config.xml is 1.9.7 then the version code it generated was 109078. The new platform version is building with version code as 10907. To explain more further, currently let’s say I have 109078 version on Play store, now when I try to build the app with a new version as, say 1.9.8, with the new platform, plugins and new version of gradle, it builds my new app with version code as 10908. Since 10908 < 109078 it is throwing an error. This is all I could figure out. Please help me in this regard, any input would be greatly appreciated.


To temporarily fix this issue, I used my older version of platform and readded the plugins which helped me get back my apps uploading to Play store.

Thank you in advance! :smile: