How to fix Google Play App (APK) upload failures

in Android Arena

After releasing an initial version of my app on Google Play, I made a minor update and needed to release a new version of the app. I made the necessary changes and updated my app’s version in AndroidManifest.xml from 1.0.0 to 1.0.1 since the update was a very minor update. I then tried re-submitting my APK file to Google Play and I kept getting an “upload failed” message. What made this issue quite frustrating was that there was no other message other than the APK upload failed message. I knew my AndroidManifest.xml file was correct since all I did was change my app version. It looked like so:

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.corntail.main"
    android:versionCode="1"
    android:versionName="1.0.1" > 

However, the APK upload always failed. Here is a screenshot of the error I was getting on FireFox:
android-uploaded-apk-failed-firefox
After several frustrating minutes of trying on FireFox, I tried uploading the same APK file on Google Chrome. I got the same error, but this time, with a more helpful message. The message said:

You need to use a different version code for your APK because you already have one with version code 1

Here is a screenshot of the upload in Chrome:
The-Avengers-Movie-Poster-010

So, it turns out that, its not enough to modify your versionName in Android you also have to modify your versionCode everytime that you publish a new version of your application on Android. So here are the things to keep in mind when updating your app on Google Play:

  1. Change your Version code by incrementing the current value by 1. So if the current value is 1, change the value to 2
  2. Change your App Version Name to something bigger. If your previous version was 1.0.0, then change it to 1.1 or 1.0.1 or whatever you like (it’s always a better option to have a consistent version naming strategy).

That’s how I resolved the issue with my uploaded APK files failing. As a side note, when updating your app, never change the project package name! The Android system uses the package name as a unique identifier for your app. For Android, a different package name corresponds to a different app! If you change your package name, Google Play will treat it like a new app and you won’t be able to update it through Google Play…

Mifty Yusuf is a Montreal-based software developer who enjoys playing with new web technologies as well as comic books and illustrations. He beleives that, no matter what the question is, the answer is always Batman!

Leave a Reply

Your email address will not be published.

*

Latest from Android Arena

Go to Top