How to solve "Your APK's version code needs to be higher than 2." in Google Play's Developer Console?

kqw picture kqw · Mar 24, 2013 · Viewed 69.2k times · Source

I'm getting this error when uploading my Phonegap app to the Google Play Developer Console:

Your APK's version code needs to be higher than 2.

How can I fix this?

Answer

user3546740 picture user3546740 · Apr 17, 2014

If you're directly using Gradle, or indirectly through Android Studio:

I fixed it by editing the version number inside of the build.gradle file! There is a small banner at the bottom of the android.manifest file that says "these changes are being overwritten by the build.gradle file."