android - 释放 key 以签署多个 Android 应用程序

标签 android key signing

您能否使用一个 my-release-key.keystore 来签署不同的应用程序,或者您是否需要为每个应用程序使用不同的 my-release-key.keystore?

最佳答案

这是直接从 Android 文档中提取的 - 粗体显示了重要的部分。

Some aspects of application signing may affect how you approach the development of your application, especially if you are planning to release multiple applications.

In general, the recommended strategy for all developers is to sign all of your applications with the same certificate, throughout the expected lifespan of your applications. There are several reasons why you should do so:

  • Application upgrade – As you release updates to your application, you will want to continue to sign the updates with the same certificate or set of certificates, if you want users to upgrade seamlessly to the new version. When the system is installing an update to an application, it compares the certificate(s) in the new version with those in the existing version. If the certificates match exactly, including both the certificate data and order, then the system allows the update. If you sign the new version without using matching certificates, you will also need to assign a different package name to the application — in this case, the user installs the new version as a completely new application.
  • Application modularity – The Android system allows applications that are signed by the same certificate to run in the same process, if the applications so requests, so that the system treats them as a single application. In this way you can deploy your application in modules, and users can update each of the modules independently if needed.
  • Code/data sharing through permissions – The Android system provides signature-based permissions enforcement, so that an application can expose functionality to another application that is signed with a specified certificate. By signing multiple applications with the same certificate and using signature-based permissions checks, your applications can share code and data in a secure manner.

Documentation

关于android - 释放 key 以签署多个 Android 应用程序,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13699998/

相关文章:

PYTHON:将字典中的值从一个键移动到另一个键

iphone - 在 iPhone 上使用 SecKeyRawSign

Cordova Build.json 密码安全

android - 为不同的环境构建不同的 APK (Xamarin.Android)

android - 在付费 Android 应用中使用 LGPL 库

Android : holder. getSurface() 总是返回 null

javascript - 当键名由变量表示时,如何将键分配给对象文字?

android - 从 sqlite 中删除不起作用

mysql - 避免 JOIN 来提高性能?

Android 构建变体签名配置