Android-Gradle从命令行构建针对多种口味的APK

时间:2019-05-29 15:40:10

标签: android gradle gradlew android-build-flavors android-flavordimension

我想同时创建多个apk。配置构建版本指南位于此处:https://developer.android.com/studio/build/build-variants

示例如下:

buildTypes {
  ...
}

flavorDimensions "api", "mode"
productFlavors {
  demo { dimension "mode" }
  full { dimension "mode" }
  minApi24 { dimension "api" }
  minApi23 { dimension "api" }
  minApi21 { dimension "api" }
}

assembleMinApi21 => MinApi21 [Full,Demo] [Debug,Release]->预期

assembleMinApi21Demo => MinApi21Demo [Debug,Release]->预期2个apk,仅生成调试版本

为什么assembleMinApi21Demo无法生成minApi21-demo-release.apk?

0 个答案:

没有答案