在尝试生成签名的 APK 时,它显示以下错误消息。
条目名称“META-INF/androidx.legacy_legacy-support-core-utils.version”发生冲突
以前它可以正常工作几年。此外,我还检查了另一台具有相同 android studio 和相同 gradle 版本的 PC,它在该 PC 中正常工作。我遇到这个问题,特别是一台 PC 本身为什么?我在下面附上了 build.gradle。
apply plugin: 'com.android.application'
android {
compileSdkVersion 29
defaultConfig {
minSdkVersion 19
targetSdkVersion 29
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
multiDexEnabled true
vectorDrawables {
useSupportLibrary = true
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
//--Test
lintOptions {
checkReleaseBuilds false
}
flavorDimensions "default"
buildTypes {
publicDebug {
minifyEnabled false
initWith debug
//shrinkResources true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
sourceSets { …Run Code Online (Sandbox Code Playgroud)