我在网上搜索但无法找到合适的解决方案。请帮我纠正这个问题....
我在build.gradle(模块应用程序)中编写了以下代码:
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion "23.0.3"
defaultConfig {
applicationId "com.project.myproject"
minSdkVersion 8
targetSdkVersion 23
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
packagingOptions{
pickFirst 'META-INF/lisence.txt'
}
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
compile 'com.android.support:appcompat-v7:23.3.0'
compile 'com.android.support:design:23.1.1'
compile files('libs/httpclient-4.4.1.jar')
compile files('libs/httpcore-4.4.1.jar')
}
现在错误:
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/DEPENDENCIES
File1: D:\Core Java\AndroidStudioProjects\MyProject\app\libs\httpclient-4.4.1.jar
File2: D:\Core Java\AndroidStudioProjects\MyProject\app\libs\httpcore-4.4.1.jar
Information:BUILD FAILED
Information:Total time: 3.104 secs
Information:1 error
Information:0 warnings
如何解决此重复问题?