Configure Eclipse to use signed keystore

richey picture richey · Jun 4, 2012 · Viewed 48.1k times · Source

I have finally created a 'final' keystore for my app. As my app is using Google Maps, I take I have to update all Layouts to use the new API Key resulting from the app as well..

Now I'm fully aware of the requirement to export a signed APK for release, but what after that? My thoughts are that for further development and testing, it would be easiest if I could configure Eclipse to use my final keystore instead of the debug keystore … but I found no way to do that? It only allows me to configure an 'alternative' debug key but I guess that's not the same.

Sorry if I am too confused if I have totally misunderstood something here.

Answer

devunwired picture devunwired · Jun 4, 2012

You can configure a custom keystore to use for your debug builds (the ones that happen when you click Run...) in Eclipse by going to Preferences -> Android -> Build and entering the file name in the "Custom debug keystore" option.

However, it has the caveat that it must follow the same rules as a traditional debug keystore, mainly:

  1. The keystore password must be "android"
  2. It must contain a key named "androiddebugkey"
  3. That key's password must be "android"

Therefore, while it is possible to sign your apps in debug with the same keystore as you Export with, it requires your production keystore to look like a debug store, which makes it less secure if someone got ahold if the file (it would be easier to inspect and guess the passwords).

HTH