google play application upload failed

android, google-play, google-play-services

Solution

If you're using Android Studio or building with gradle, edit your gradle script (build.gradle) to change your package name and version. These values overwrite your AndroidManifest.xml file.

For example:

 defaultConfig {
        applicationId "com.xyz.abc"
        minSdkVersion 16
        targetSdkVersion 19
        versionCode 2
        versionName "1.1"
    }

Problem

apk upload failed to the google play market. I am trying to upload the upgraded version of my app to the google play but I am keep getting the message - ``` Upload failed You need to use a different version code for your APK because you already have one with version code 1. Your APK needs to have the package name com.corntail.project. ``` There is still something that is looking for `com.corntail.project` and it is not being found. UPDATE: In my `AndroidManifest.xml`, the relevant code is - ``` <?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" > ```

Original source