Home > Blockchain >  I want to install 2 application with same package name one from play store and second from android s
I want to install 2 application with same package name one from play store and second from android s

Time:12-12

Hello Android Devs

I have an application that is already on the play store as a **live **app that already installed on my phone. Now I want to install the beta app for myself.

In Gradle file I already made 2 flavors 1. dev & 2. live

Detailed:

So the problem is I uploaded the app on the play console with* package name: com.example.one* when i installed the app on live it install properly but when I install it from the android studio it uninstalls live app and beta app.

My developer friend give me a suggestion that change the package name and installed it on your phone but what if when i upload latest version on live it can any problem like jks and package issue from google play.

I already change package name but what if play store reject my app because i change app package name.

CodePudding user response:

If you want to install two flavors of a given application twice, you'll need to resort to changing the applicationId for the two apps so that they're not identical. One of the easier ways of doing so is by setting the applicationIdSuffix in your Gradle files for the different flavors.

Google mentions this in their documentation:

When you build an APK or AAB for your app, the build tools tag the app with the application ID defined in the defaultConfig block from the build.gradle file (as shown below). However, if you want to create different versions of your app to appear as separate listings on Google Play Store, such as a "free" and "pro" version, you need to create separate build variants that each have a different application ID.

In this case, each build variant should be defined as a separate product flavor. For each flavor inside the productFlavors block, you can redefine the applicationId property, or you can instead append a segment to the default application ID using applicationIdSuffix

  • Related