anthony
anthony

Reputation: 7733

Android: error on upload APK on Google Play (flavor using)

In my gradle I have 2 flavors:

defaultConfig {
        applicationId "com.toto"
        ...
}

productFlavors {

        //noinspection GroovyMissingReturnStatement
        staging {
            applicationIdSuffix ".staging"
            versionCode 78
            versionName "0.0.78"

           ...
        }

        production {
            versionCode 78
            versionName "0.0.78"

            ....
        }

So, I have 2 APK (in release mode):

From Google Developer console, I want to manage my APK(s) like that:

If I upload my staging version, there is an error at the end of process: my App name must be match with "com.toto" ... BUT it's the staging version, so the name is "com.toto.staging".

How can I resolve that for having 2 APK (prod and staging) into Google Play console?

Thank you very much guys!

Upvotes: 0

Views: 587

Answers (1)

Moonbloom
Moonbloom

Reputation: 7918

You can't have 2 different package names listed as the same app on Google Play, even if it's under Production and Alpha/Beta.

The entire point of Alpha/Beta tracks is that you can upload a new update to your app as a Alpha version, test it out, and then move that same app version to Beta or Production (if it works well after your Alpha test).

To do this, it has to be the same package name.

You'll literally have to create a new App on Google Play to handle a "staging" version. This app can of course be under the same account.

We have both a Prod version, and a Test version, with different package names, 2 different apps.

Upvotes: 2

Related Questions