Gradle中的prolog错误中不允许使用内容

时间:2016-04-08 05:12:27

标签: java android android-gradle build.gradle

在我的项目中我使用apache-httpcomponents-httpcore.jar来访问Http Components但是当我同步Gradle它显示错误时,

Gradle Error:

 F:\softwares backup\ecllipse\workspace\Test\app\src\main\res\lib\apache-httpcomponents-httpcore.jar 
 Error: Content is not allowed in prolog.
 Error:Execution failed for task ':app:mergeDebugResources'.
 > F:\softwares backup\ecllipse\workspace\Test\app\src\main\res\lib\apache-httpcomponents-httpcore.jar:1:1: Error: Content is not allowed in prolog.
 Information:BUILD FAILED

我的Gradle文件:

 dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.2.0'
compile 'com.google.android.gms:play-services:8.4.0'
compile 'com.android.support:design:23.2.0'
compile 'com.android.support:support-v4:23.2.0'
compile 'com.android.support:recyclerview-v7:23.2.0'
compile files('src/main/res/lib/org.apache.httpcomponents.httpclient_4.5.2.jar')
compile files('src/main/res/lib/apache-httpcomponents-httpcore.jar')
 }
 android{
packagingOptions {
    exclude 'META-INF/DEPENDENCIES'
    exclude 'META-INF/NOTICE'
    exclude 'META-INF/LICENSE'
    exclude 'META-INF/LICENSE.txt'
    exclude 'META-INF/NOTICE.txt'
}
}

请指导我清除此问题。

0 个答案:

没有答案