我想提出一個Android應用程序,其中我使用thses lib目錄下:在APK複製重複文件META-INF /行家/ org.apache.httpcomponents/httpmime/pom.xml的
compile "org.apache.httpcomponents:httpcore:4.4.4"
compile "org.apache.httpcomponents:httpmime:4.4.1"
,但它給了錯誤com.android.builder.packaging.DuplicateFileException: Duplicate files copied in APK META-INF/maven/org.apache.httpcomponents/httpmime/pom.xml File1: C:\Users\Vivek\projectX\app\libs\httpmime-4.4.1.jar File2: C:\Users\Vivek\.gradle\caches\modules-2\files-2.1\org.apache.httpcomponents\httpmime\4.4.1\2f8757f5ac5e38f46c794e5229d1f3c522e9b1df\httpmime-4.4.1.jar
,所以我搜索,發現溶膠,並使用 packagingOptions { exclude 'META-INF/maven/com.google.guava/guava/pom.properties' exclude 'META-INF/maven/com.google.guava/guava/pom.xml' }
,但再次顯示相同的錯誤不會有人知道我在做wrong.thankü
http://stackoverflow.com/questions/20827885/android- studio-0-4-duplicate-files-copied-in-apk-meta-inf-license-txt –
add'compile group:'org.apache.httpcomponents',name:'httpclient-android',version:'4.3。 5.1' compile'org.apache.httpcomponents:httpmime:4.3.5'' –
我早些時候使用它,它不工作。 –