Question

I have created release (exported) version of the app. That created problem that debug version uses debug certificate for signing and exported version uses different certificate.

  • Is it possible that they both use the same release version certificate?
  • If yes, then is it possible to save certificate password, so I don't have to type it every time I export (or compile) application?

  • If this is not advised or impossible, then how do you deal with Android shouting about Failure [INSTALL_PARSE_FAILED_INCONSISTENT_CERTIFICATES] every time you want to install release app into device which already has debug app installed?

  • And how do you deal with Android Google Maps API V2 not working with debug certificate, because AndroidManifest.xml has the key which works only with app signed with release certificate?

Was it helpful?

Solution

You can automate your build process with gradle or ant. Once you do that its easier to build the signed apk. Using the latest Android studio you can create multiple versions of the same build at a time.

This question and its answers will help you resolve this .

OTHER TIPS

To answer.

  1. If a app is signed with same certificate it won't cause any issue, and basically there can never be two version of same certificate. Second, yes by default sdk use debug certificate to sign your application , and while releasing its on you to choose which certificate to sign.

  2. You can create a batch file with predefined command to Sign you application, all you need to do is a. release your application raw, withouht signing b. Use Jarsigner, and your custom made certificate to sign it c. Use Zipaligner to optimize it, you can easily club this command in a batch file (in windows)

  3. This error shows up when, already installed same application carries a signature of different certificate then what you are trying to push again, so either you remove preinstalled app manually and install new one, or sing the new app with same certificate in push it into device.

  4. You can very well integrate Google Maps APIv2 with debug key, all you need to do is to register your app with google using hash of debug key and using generated key in your app.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top