1

Was trying to get the MPAndroidCharts to work

Error:FAILURE: Build failed with an exception.

  • What went wrong: Execution failed for task ':app:transformResourcesWithMergeJavaResForDebug'.

    More than one file was found with OS independent path 'META-INF/proguard/androidx-annotations.pro'

  • 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.

  • Get more help at https://help.gradle.org BUILD FAILED in 46s

2 Answers2

0

Add this piece of code in your application level build.gradle file.

packagingOptions {
    exclude 'META-INF/proguard/androidx-annotations.pro'
}
0

You can specify gradle to pick first (i.e. only one)

packagingOptions {
    pickFirst 'META-INF/proguard/androidx-annotations.pro'
}
Sumit Sahoo
  • 2,949
  • 1
  • 25
  • 37