android studio编译报错:
2 files found with path 'META-INF/kotlinx_coroutines_core.version'.
Adding a packagingOptions block may help
点击上一级报错原因:
Execution failed for task ':app:mergeDebugJavaResource'.
> A failure occurred while executing com.android.build.gradle.internal.tasks.MergeJavaResWorkAction
> 2 files found with path 'META-INF/kotlinx_coroutines_core.version' from inputs:
解决方案:在app module的build.gradle文件里面的android{}增加packagingOptions配置,exclude 排除META-INF/kotlinx_coroutines_core.version:
packagingOptions { exclude 'META-INF/kotlinx_coroutines_core.version' }
来源地址:https://blog.csdn.net/zhangphil/article/details/129302957