问题
Recently, I was working with Android Maps V2. I came across debug.keystore
and release.keystore
. What is the difference between them? Why do we have to use both?
回答1:
The Android build process signs your application differently depending on which build mode you use to build your application.
There are two build modes: debug mode and release mode.
You use debug mode when you are developing and testing your application.
You use release mode when you want to build a release version of your application that you can distribute directly to users or publish on an application marketplace such as Google Play.
When you build in debug mode the Android SDK build tools use the Keytool utility (included in the JDK) to create a debug key. Because the SDK build tools created the debug key, they know the debug key's alias and password. Each time you compile your application in debug mode, the build tools use the debug key along with the Jarsigner utility (also included in the JDK) to sign your application's .apk file. Because the alias and password are known to the SDK build tools, the tools don't need to prompt you for the debug key's alias and password each time you compile.
When you build in release mode you use your own private key to sign your application. If you don't have a private key, you can use the Keytool utility to create one for you. When you compile your application in release mode, the build tools use your private key along with the Jarsigner utility to sign your application's .apk file. Because the certificate and private key you use are your own, you must provide the password for the keystore and key alias.
The debug signing process happens automatically when you run or debug your application using Eclipse with the ADT plugin. Debug signing also happens automatically when you use the Ant build script with the debug option. You can automate the release signing process by using the Eclipse Export Wizard or by modifying the Ant build script and building with the release option.
EDIT
For signing android app with android studio see here
http://developer.android.com/tools/publishing/app-signing.html#releasemode
回答2:
debug.keystore is merely for developing and testing purposes, so using that you can't release your app to Google Play using that only.
Caution: You should not release your application to the public (via any source) when signed with the debug certificate.
release.keystore is required only when you want to release your app to any app store.
For more information, see Signing Your Applications, subsection Signing in Release Mode.
回答3:
You can work on developing the Android app with debug.keystore
. The release.keystore
will be need when your app is ready to be submitted as an app on Play Store.
回答4:
You cannot publish your app to Google Play with debug.keystore
, and users won't be able to download your app.
回答5:
debug.keystore is used at the time of development, where as release.keystore will be used at product release... link
回答6:
debug.keystore is used to generate Google Map API V2 key for Debug purpose . release.keystore is used to generate map key before uploading app to Google Play.
回答7:
debug.keystore you call for testing purposes for developers, because it contains the default alias and default key password and also by using this you can not publish your app into the play store.
release.keystore you call for the final app certification keystore. This keystore has its own alias and own key password. And for every new publish of your app, you must generate an signed APK file by using this keystore.
For more information, see Signing Your Applications.
来源:https://stackoverflow.com/questions/21880106/what-is-difference-between-debug-keystore-and-release-keystore-in-android