下面是生成ABC和XYZ风格的代码。
productFlavors {
ABC{
applicationId 'com.domainName.ABC'
minSdkVersion 16
targetSdkVersion 21
versionCode 1
versionName '1.0'
}
XYZ{
minSdkVersion 16
applicationId 'com.domainName.XYZ'
signingConfig signingConfigs.release
targetSdkVersion 21
versionCode 1
versionName '1.0'
}
}
buildTypes {
debug {
debuggable true
applicationIdSuffix '.debug'
}
release {
applicationIdSuffix '.release'
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
它正在成功生成调试apks但在生成发布apks时出现以下错误
Error:Execution failed for task ':mobile:handleABCReleaseMicroApk'.
> The main and the micro apps do not have the same package name.