Manage Android app flavors on Google Play
Asked Answered
L

1

7

I just created 2 flavors for my app: Staging and Production.

Everything seems to work well in both flavors so now I would like to upload my staging release apk (signed) so that testers can test it.

As I have a different applicationId for my staging app:

    stage {
        applicationId defaultConfig.applicationId + ".stage"
        versionName defaultConfig.versionName + "-stage"
        resValue "string", "app_name", "MyApp Staging"
    }

Do I need to create a new App in console play console and deploy this apk to the new version or is there a way to use the same App?

Right now, when I try to upload the staging release app, I get the following error:

Upload failed
Your APK needs to have the package name com.my.app.
Lody answered 30/4, 2017 at 14:43 Comment(0)
C
12

If the applicationId is different, it would need to be a separate app in play store. This is on the documentation of applicationId

Every Android app has a unique application ID that looks like a Java package name, such as com.example.myapp. This ID uniquely identifies your app on the device and in Google Play Store. If you want to upload a new version of your app, the application ID (and the certificate you sign it with) must be the same as the original APK—if you change the application ID, Google Play Store treats the APK as a completely different app. So once you publish your app, you should never change the application ID.

If you don't want to "pollute" your play store, one other good option is to use Beta by Fabric for free to simplify distribution of your staging builds for your internal testers and stake holders. Using this they can even download any of the older releases and will be informed of new updates as soon as it is released. There is no waiting time unlike Google Play Store where it might take sometimes few hours or more to make the update available to all the users. Recently Fabric has been bought by Google.

P.S: I just a happy user of Fabric Beta and in no way related to them.

Cowen answered 30/4, 2017 at 14:51 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.