All of a sudden, I am getting this error while building APK
Error:Execution failed for task \':app:transformResourcesWithMergeJavaResForDevDebug\'.
> Mor
In my case, I've excluded only path 'META-INF/LICENSE' on yourProject/app/build.gradle
inside android{}
. Here it is
packagingOptions {
exclude 'META-INF/LICENSE'
}
After it Clean Project and Rebuild Project.
If above case doesn't work for you then You can add this in yourProject/app/build.gradle
inside android{}
packagingOptions {
exclude 'META-INF/DEPENDENCIES'
exclude 'META-INF/LICENSE'
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/license.txt'
exclude 'META-INF/NOTICE'
exclude 'META-INF/NOTICE.txt'
exclude 'META-INF/notice.txt'
exclude 'META-INF/ASL2.0'
}
You can try using pickFirst
something like this:
packagingOptions {
// this is the lazy option.
//pickFirst 'META-INF/*'
pickFirst 'META-INF/android.arch.lifecycle_runtime.version'
}