简体   繁体   中英

How to Install Apk Development and Production Version in the same phone?

I tried to install development apk in to my phone who already has the production version from playstore, but I got an error that said " existing package by the same name with a conflicting signature is already installed " I tried to rename the package, but it seems doesn't work. so Is there anyway I can install both of version apk in my phone?

You need to change the applicationId available in your app module's build.gradle .

Alternatively you can use applicationIdSuffix under your build configuration as follows:

android {
    ...
    buildTypes {
        debug {
            applicationIdSuffix '.debug'
           ...
        }
        ...
    }
}

If you are dealing with app flavors, and want to change applicationIdSuffix as per flavor, you can check my answer from this SO .

android gradle support 'applicationIdSuffix' . you can assign it in your flavor's or buildtype's config .such as :

productFlavors {
    dev21 {
        minSdkVersion 21
        applicationIdSuffix '.dev'
    }
    dev {
        applicationIdSuffix '.dev'
    }
}

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM