是“debug.keystore'和'release.keystore”在Android中有什么区别? [英] What is difference between 'debug.keystore' and 'release.keystore' in Android?

查看:1284
本文介绍了是“debug.keystore'和'release.keystore”在Android中有什么区别?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

最近,我正在与Android地图V2。我碰到 debug.keystore release.keystore 。它们之间的区别是什么?我们为什么要同时使用?

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?

推荐答案

Android的构建过程签署您的应用程序不同,这取决于建模式下,你用它来构建应用程序。

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.

当您在调试模式下构建一个Android SDK编译工具使用Keytool工具(包含在JDK)创建调试的关键。由于SDK构建工具创建的调试关键,他们知道调试密钥的别名和密码。每次编译在调试模式下应用程序时,编译工具使用伴随着的jarsigner实用程序(也包含在JDK)签署您的应用程序的.apk文件中的调试的关键。因为别名和密码是已知的SDK构建工具,这些工具并不需要提示您每次编译时的调试关键的别名和密码。

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.

当你建立在释放模式您使用自己的私钥签名您的应用程序。如果您没有私钥,您可以使用Keytool实用程序来创建一个给你。当你编译发布模式应用程序,编译工具使用你的私钥一起的jarsigner工具来签署您的应用程序的.apk文件。由于您使用的证书和私钥是你自己的,你必须提供的密码密钥库和密钥的别名。

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.

当您运行或使用Eclipse的ADT插件调试应用程序调试签名过程自动发生。当您使用Ant构建脚本调试选项调试签订也会自动发生。您可以使用Eclipse导出向导,或通过修改Ant构建脚本,并建立与释放选项自动释放签名过程。

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.

修改

有关签署了Android的工作室在这里看到的Andr​​oid应用程序

For signing android app with android studio see here

<一个href="http://developer.android.com/tools/publishing/app-signing.html#releasemode">http://developer.android.com/tools/publishing/app-signing.html#releasemode

这篇关于是“debug.keystore'和'release.keystore”在Android中有什么区别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆