android - 使用多个 keystore 文件生成多个 apk

标签 android gradle groovy android-gradle-plugin build.gradle

我正在使用 following instructions在 Android Studio 中用于生成多个 APK:

android {
  ...
  splits {

    // Configures multiple APKs based on ABI.
    abi {

      // Enables building multiple APKs per ABI.
      enable true

      // By default all ABIs are included, so use reset() and include to specify that we only
      // want APKs for x86 and x86_64.

      // Resets the list of ABIs that Gradle should create APKs for to none.
      reset()

      // Specifies a list of ABIs that Gradle should create APKs for.
      include "x86", "x86_64"

      // Specifies that we do not want to also generate a universal APK that includes all ABIs.
      universalApk false
    }
  }
}

问题是:如何为每个不同的 APK 分配不同的 keystore ?我在官方指南上没有找到说明...

最佳答案

您好@Lore,您不能创建或定义不同的 keystore 或 keystore 的详细信息进行扩展,因为这只是同一个 APK 的扩展,您可以按照以下文档进行扩展:
Configure build variants

您可以定义 keystore 数据并为不同的风格创建 apk:
Link for define keystore data in product flavor

关于android - 使用多个 keystore 文件生成多个 apk,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58746716/

相关文章:

java - 在评估阶段使用 Gradle 插件配置属性

types - 如何使用 JSoup 从网页获取资源类型?

android - 为什么 Activity 有自己的图标?

android - 单击小部件将任务置于最前面

安卓 : Is possible to add calendar event without calling the Google Calendar API or Starting Native Calendar activity?

android - 在 flickr 中上传图片显示错误

groovy - Groovy 中的 JUnit @Before 方法排序

gradle - gradle将不再同步插件

Gradle - 从 .properties 文件加载属性

java - 在自定义输出目录下添加 gradle 资源