Is there any way to install in the same android mobile a debug version of my app AND a google play store version of my app? I try to setup on my android multiple users, but when from another user than the owner user (where the debug version of my app is installed) I try to install the app from google play store I receive:

you cannot install this app because another user has already installed an incompatible version

3

There are 3 answers

0
Iffat Fatima On

No. Not unless you change the package name of your debug version application. See detailed discussion here

2
Ganesh Singh On

Android OS doesn't allow installing the two apps having same package name and signature (signed with keystore)

For e.g.

app package: com.xxx.example
some signature: xxxxxxx

Solution: Use application Gradle flavours to create debug and signed apk and in flavour change the package name while building the app. Refer the link below for the Gradle and flavour work around

https://developer.android.com/studio/build/build-variants

0
Sarah Maher On

You could either use flavours or build types to achieve this .

using build types like this example will gave you three buildtypes, you will get 3 different package names which means that you will be able to install all of them on a device at the same time .

 buildTypes {
    debug {
        applicationIdSuffix = ".debug"
        testCoverageEnabled = "true"
    }

    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-project.txt'
    }

    beta {
        applicationIdSuffix = ".beta"
        initWith release
    } }

there is more to the this subject in the android documents I'd recommend you read it : https://developer.android.com/studio/build/