嗨,我試圖建立一個Twilio短信發送應用程序,我已經添加了所有這些東西build.gradle.This是我gradle.During應用程序乳寧,我越來越Twilio的Android gradle這個錯誤
`Error:Execution failed for task ':app:transformResourcesWithMergeJavaResForDebug'.
com.android.build.api.transform.TransformException:com.android.builder.packaging.DuplicateFileException:在APK中複製的重複文件META-INF/maven/org.apache.httpcomponents/httpcore/pom.xml File1:I: \ AS_Projects \ Tacos \ app \ libs \ twilio -java -sdk-3.8.0 -jar -with-dependencies.jar File2:I:\ AS_Projects \ Tacos \ app \ libs \ httpcore-4.4.4.jar`
//我每次都
'apply plugin: 'com.android.application'
android {
packagingOptions {
exclude 'META-INF/NOTICE' // will not include NOTICE file
exclude 'META-INF/LICENSE' // will not include LICENSE file
}
compileSdkVersion 23
buildToolsVersion '23.0.3'
defaultConfig {
applicationId "com.twilio.client.quickstart"
minSdkVersion 9
targetSdkVersion 23
versionCode 1
versionName "1.0"
}
defaultConfig {
applicationId "android.revengine.com.tacos"
minSdkVersion 16
targetSdkVersion 23
versionCode 1
versionName "1.0"
}
packagingOptions {
exclude 'META-INF/DEPENDENCIES.txt'
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/NOTICE.txt'
exclude 'META-INF/NOTICE'
exclude 'META-INF/LICENSE'
exclude 'META-INF/DEPENDENCIES'
exclude 'META-INF/notice.txt'
exclude 'META-INF/license.txt'
exclude 'META-INF/dependencies.txt'
exclude 'META-INF/LGPL2.1'
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
productFlavors {
}
}
dependencies { compile fileTree(include: ['*.jar'], dir: 'libs') testCompile 'junit:junit:4.12' compile 'com.android.support:appcompat-v7:23.3.0' compile 'com.android.support:design:23.3.0' compile files('libs/httpclient-4.5.2.jar') compile files('libs/httpcore-4.4.4.jar') compile files('libs/httpmime-4.5.2.jar') compile files('libs/twilio-client-android.jar') compile files('libs/twilio-java-sdk-3.8.0-jar-with-dependencies.jar') }