英文:
I have a "META-INF/androidx.legacy_legacy-support-core-utils.version"Error . How can ı solve my problem
问题
当我想生成已签名的APK文件时,我遇到了“META-INF/androidx.legacy_legacy-support-core-utils.version”错误。
我该如何解决这个问题。
Build Gradle(app)
apply plugin: 'com.android.application'
android {
compileSdkVersion 30
buildToolsVersion "30.0.0"
defaultConfig {
applicationId "com.viadom"
minSdkVersion 19
targetSdkVersion 30
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
debuggable true
signingConfig signingConfigs.debug
}
}
}
dependencies {
implementation fileTree(dir: "libs", include: ["*.jar"])
implementation 'androidx.appcompat:appcompat:1.1.0'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
implementation 'com.google.android.gms:play-services-ads:19.4.0'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test.ext:junit:1.1.1'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
}
注意:如果您需要进一步的帮助,请随时提问。
英文:
When I want get generate singed apk then I have "META-INF/androidx.legacy_legacy-support-core-utils.version" error .
How can ı solve my problem .
Build Gradle(app)
apply plugin: 'com.android.application'
android {
compileSdkVersion 30
buildToolsVersion "30.0.0"
defaultConfig {
applicationId "com.viadom"
minSdkVersion 19
targetSdkVersion 30
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
debuggable true
signingConfig signingConfigs.debug
}
}
}
dependencies {
implementation fileTree(dir: "libs", include: ["*.jar"])
implementation 'androidx.appcompat:appcompat:1.1.0'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
implementation 'com.google.android.gms:play-services-ads:19.4.0'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test.ext:junit:1.1.1'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
}
答案1
得分: 0
Sure, here's the translated content:
在你的 build.gradle 文件的 android 块下添加 packageOptions。
android {
...
packagingOptions {
pickFirst 'META-INF/androidx.legacy_legacy-support-core-utils.version'
}
}
英文:
add packageOptions to you build.gradle file under android block.
android {
...
packagingOptions {
pickFirst 'META-INF/androidx.legacy_legacy-support-core-utils.version'
}
}
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论