1.配置手机架构
splits {abi {enable truereset()include 'armeabi-v7a','arm64-v8a'universalApk false}
}
2.多渠道
productFlavors {normal {applicationId "*****"manifestPlaceholders = [appName: "@string/app_name_normal"]}driver {applicationId "com.****"manifestPlaceholders = [appName: "@string/app_name_driver"]}}
3.修改输出名(如:app_driver_armeabi-v7a_release_v1.2.28.apk)
android.applicationVariants.all { variant ->def time = new Date().format("yyyyMMddHHmm")def versionName = "${variant.versionName}"variant.outputs.all { output ->print(output)String abi = ""if (output.getFilters() != null && output.getFilters().size() > 0) {abi = output.getFilters().get(0).getIdentifier()}outputFileName = "app_${productFlavors[0].name}_${abi}_${buildType.name}_${versionName}.apk"}}