I can't generate a signed release apk due to the following error in Gradle built.
Execution failed for task ':app:packageDebug'.
> A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
> Entry name 'kotlin/collections/MapWithDefault.kotlin_metadata' collided
but there is no problem with running my app on a device. I have tried invalidating caches and restarting, deleting old generated debug/release apks.
One additional action I have done in Gradle is that, I have applicationIdSuffix, versionNameSuffix, and sperate name for debug and release builds. My Gradle buildTypes for app module goes like this
buildTypes {
release {
resValue "string", "app_name", "@string/app_name_release"
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
debug {
versionNameSuffix ".debug"
applicationIdSuffix = ".debug"
resValue "string", "app_name", "@string/app_name_debug"
minifyEnabled true
shrinkResources true
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
question from:
https://stackoverflow.com/questions/65832351/cant-generate-signed-apk-because-gradle-failes-for-task-apppackagedebug 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…