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/library_release.kotlin_module' from inputs:
- C:\Users\pc5\.gradle\caches\transforms-2\files-2.1\ce2b46fc1c5f5af8ed7abfa332710f84\zoomlayout-1.9.0\jars\classes.jar
- C:\Users\pc5\.gradle\caches\transforms-2\files-2.1\a562c978ea1815ba0e02c6c6a3c46b97\egloo-0.6.1\jars\classes.jar
Adding a packagingOptions block may help, please refer to
https://google.github.io/android-gradle-dsl/current/com.android.build.gradle.internal.dsl.PackagingOptions.html
for more information
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
When Importing the zoomlayou third-party library, the installation reports an error, Clean Project, clearing the cache and restarting are also invalid
Solution:
Add the following code to the module’s build.gradle under the android tab
android {
packagingOptions {
pickFirst "META-INF/library_release.kotlin_module"
}
}
or
android {
packagingOptions {
exclude "META-INF/library_release.kotlin_module"
}
}