【问题标题】:Generate multiple apk with multiple keystore files使用多个密钥库文件生成多个 apk
【发布时间】:2020-03-03 21:57:39
【问题描述】:

我在 Android Studio 中使用following instructions 来生成多个 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?我在官方指南上没有找到说明...

【问题讨论】:

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


    【解决方案1】:

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

    您可以定义密钥库数据并为不同的风格创建 apkLink for define keystore data in product flavor

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2020-05-12
      • 2013-02-26
      • 2021-06-12
      • 1970-01-01
      • 2016-12-05
      • 1970-01-01
      • 2015-05-21
      • 1970-01-01
      相关资源
      最近更新 更多