Android: Error - application has the same packed different signature

I get a problem when android studio says

Installation failed since the device has an application with the same package but a different signature. . . .. 

This is correct since I recently signed the APK and loaded into the beta zone of my developer console.

And now I'm trying to debug it locally, and by default I believe that all Android projects are signed by the debug repository, so the signatures will be different.

What is the best way to handle this? Can I sign my debug version with my release key and is there a potential danger?

How would I force to sign my debug version with my keystore without losing the ability to debug, etc.?

Or you just need to continue uninstalling and reinstalling different versions - this seems like the worst possible solution. :-)

+9
source share
2 answers

You can sign your applications using the release key, while retaining the debugging option - you just need to add the key to the release in Android Studio (or specify it on the command line if you sign your applications there).

In Android Studio, right-click your application in the project browser and open the module settings. Select your application module and click "Sign" to make sure that your keystore is specified. Then, in the "Build Types" section, make sure that the debugging target and the target version of the release have the same configuration file for signing, and that the debugging target has a debugging setting of true. Now they must use the same key.

More information about signing the application can be found in the Developer Docs here .

I have not heard about the drawback of using the same key for debugging and release, if the private key is kept secure (read: not under version control).

+20
source

try changing debugging to release in build options

0
source

Source: https://habr.com/ru/post/1210784/


All Articles