exifinterface建设约androidX错误,但我不迁移到androidX

问题描述 投票:0回答:2

当我尝试建立应用它给我生成选项卡上的这个错误

多个文件中发现了独立于操作系统的路径“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"

}
android gradle android-gradle build.gradle androidx
2个回答
0
投票

必须将此行添加到我的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'
}

0
投票

但是你没有改变你的gradles到Android X库。只是整个项目移植到Android X.

© www.soinside.com 2019 - 2024. All rights reserved.