問題:
Android studio打包apk的時候碰到了
Warning: Exception while processing task java.io.IOException: The same input jar [/xxx/src/xxx/app/libs/android-support-v13.jar] is specified twice.
問題原因:
dependencies {
implementation fileTree(dir: 'libs', include: '*.jar')
}
裏面已經添加過jar包,混淆文件proguard.cfg裏面又加了
-libraryjars ./libs/android-support-v13.jar
解決方法:
將-libraryjars ./libs/android-support-v13.jar 用
#號註釋或者直接刪掉即可。
如:
#-libraryjars ./libs/android-support-v13.jar
衍生:
該問題可擴展至於The same input jar xxx.jar is specified twice
當遇到這種問題的時候首先看看xxx.jar是否在混淆文件proguard.cfg中添加了,如果添加了,解決方法如上