Duplicate files copied in APK META-INF/LICENSE 編譯失敗解決方法
阿新 • • 發佈:2017-11-21
style python tran pcl brush builder exce exc -i
# 錯誤日誌
> com.android.build.api.transform.TransformException: com.android.builder.packaging.DuplicateFileException: Duplicate files copied in APK META-INF/LICENSE File1: /Users/xulun/Downloads/android 2/app/libs/httpclient-4.5.3.jar File2: /Users/xulun/Downloads/android 2/app/libs/httpcore-4.4.6.jar
1 # 解決方法 build.gradle 添加, 看報錯而定 2 android { 3 packagingOptions { 4 #exclude ‘META-INF/DEPENDENCIES‘ 5 #exclude ‘META-INF/NOTICE‘ 6 exclude ‘META-INF/LICENSE‘ 7 #exclude ‘META-INF/LICENSE.txt‘ 8 #exclude ‘META-INF/NOTICE.txt‘ 9 } 10 // ... 11}
Duplicate files copied in APK META-INF/LICENSE 編譯失敗解決方法