Disclaimer: This article is a blogger original article, follow the CC 4.0 BY-SA copyright agreement, reproduced, please attach the original source link and this statement.
android abnormal Summary: file appears more than once in a jar package.
Error:Execution failed for task ':app:transformResourcesWithMergeJavaResForDebug'.
> More than one file was found with OS independent path 'META-INFXXX'
Such codes need to be added at the node app.gradle file inside android
packagingOptions {
exclude 'META-INF/XXX'
exclude 'META-INF/XXX'
exclude 'META-INF/XXX'
exclude 'META-INF/XXX'
exclude 'META-INF/XXX'
exclude 'META-INF/XXX'
exclude 'META-INF/XXX'
}
Specific changes location
apply plugin: '
android {
compileSdkVersion 26
defaultConfig {
applicationId ""
minSdkVersion 15
targetSdkVersion 26
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
packagingOptions {
exclude 'META-INF/XXXX'
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}