gpt4 book ai didi

android - exifinterface 关于 androidX 的构建错误,但我没有迁移到 androidX

转载 作者:行者123 更新时间:2023-12-03 05:38:44 28 4
gpt4 key购买 nike

当我尝试构建应用程序时,它在构建选项卡上给了我这个错误

More than one file was found with OS independent path 'META-INF/androidx.exifinterface_exifinterface.version



而且我没有在我的任何模块中使用 AndroidX

我还将它添加到我的 build.gradle
packagingOptions {
exclude 'META-INF/DEPENDENCIES.txt'
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/NOTICE.txt'
exclude 'META-INF/NOTICE'
exclude 'META-INF/LICENSE'
exclude 'META-INF/DEPENDENCIES'
exclude 'META-INF/notice.txt'
exclude 'META-INF/license.txt'
exclude 'META-INF/dependencies.txt'
exclude 'META-INF/LGPL2.1'
exclude 'META-INF/proguard/androidx-annotations.pro'
}
dependencies
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')

implementation "com.android.support:appcompat-v7:$supportLibraryVersion"
implementation "com.android.support:design:$supportLibraryVersion"
implementation "com.android.support:cardview-v7:$supportLibraryVersion"
implementation "com.android.support:exifinterface:$supportLibraryVersion"
implementation "com.android.support:support-media-compat:$supportLibraryVersion"
implementation "com.android.support:support-v4:$supportLibraryVersion"

}

最佳答案

必须将此行添加到我的 packagingOptions

exclude 'META-INF/androidx.exifinterface_exifinterface.version'

所以我的 packagingOptions改成这样
packagingOptions {
exclude 'META-INF/DEPENDENCIES.txt'
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/NOTICE.txt'
exclude 'META-INF/NOTICE'
exclude 'META-INF/LICENSE'
exclude 'META-INF/DEPENDENCIES'
exclude 'META-INF/notice.txt'
exclude 'META-INF/license.txt'
exclude 'META-INF/dependencies.txt'
exclude 'META-INF/LGPL2.1'
exclude 'META-INF/proguard/androidx-annotations.pro'
exclude 'META-INF/androidx.exifinterface_exifinterface.version'
}

关于android - exifinterface 关于 androidX 的构建错误,但我没有迁移到 androidX,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54378371/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com