Reputation: 1
I am programming an android app with android studio . I also add some jars . I am trying to run it but I am getting this error:
Error:Execution failed for task ':app:transformResourcesWithMergeJavaResForDebug'.
com.android.build.api.transform.TransformException: com.android.builder.packaging.DuplicateFileException: Duplicate files copied in APK META-INF/LICENSE
What should I do to solve it?
Error:(32, 0) Gradle DSL method not found: 'packagingOptions()' Possible causes:
- The project 'xxxxxx' may be using a version of Gradle that does not contain the method. Open Gradle wrapper file
- The build file may be missing a Gradle plugin. Apply Gradle plugin
That's what I'm seeing, how to solve this problem?
Upvotes: 0
Views: 254
Reputation: 663
Try to add these line in your app gradle.
packagingOptions
{
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/NOTICE.txt'
}
Upvotes: 2