在将我的依赖项升级到最新版本时:
implementation "com.google.firebase:firebase-ml-common:16.1.6"
implementation "com.google.firebase:firebase-ml-model-interpreter:16.2.4"
implementation "com.google.firebase:firebase-ml-vision:18.0.2"
我的构建因以下异常而失败:
* What went wrong:
Execution failed for task ':mlkit:app:transformResourcesWithMergeJavaResForDebug'.
> More than one file was found with OS independent path 'META-INF/androidx.exifinterface_exifinterface.version'
我该如何解决?
答案 0 :(得分:4)
您可以安全地将以下内容添加到应用程序android {}
文件的build.gradle
块中,以忽略这些文件:
android {
//
// ...
//
packagingOptions {
exclude 'META-INF/androidx.exifinterface_exifinterface.version'
exclude 'META-INF/proguard/androidx-annotations.pro'
}
}