HOW TO FIX VERSION NAME AND VERSION CODE PROBLEM
Today I have published a new Version of my App, but I received an error: "You must change the Version Code, because there is already an APK with Version Code = 1".
So I opened the manifest.xml in Android Studio and I wrote, in the xml configuration, this 2 lines:
android:VersionCode="2"
android:VersionName="1.1"
But when I uploaded again my APK, I still had the same error.
Then I have understood the problem,
if you want to change the Version Name and the Version Code, you must change it in the manifest.xml AND IN THE build.gradle!
So I opened the build.gradle, I changed the version name and the version code, then I syncronized the gradle and I saved my Project.
Then I uploaded my APK again and it has worked!
If you have another problem, write it below
Last comments