The same input jar is specified twice 解决办法

编程入门 行业动态 更新时间:2024-10-12 05:49:17

The same input jar is specified twice <a href=https://www.elefans.com/category/jswz/34/1767401.html style=解决办法"/>

The same input jar is specified twice 解决办法

The same input jar is specified twice 解决办法

Android studio打包中遇到了这样的问题

Warning:Exception while processing task java.io.IOException: The same input jar […….jar] is specified twice.

解决方法如下:

打开 proguard.cfg
在所有的-libraryjars 前插入 # 成 #-libraryjars xxxx.jar

原因分析

原因是build.gradle文件配置了

dependencies {compile fileTree(include: '*.jar', dir: 'libs')
}

里面已经添加过jar包,混淆文件proguard.cfg里面又加了句-libraryjars libs/***.jar,将-libraryjars libs/***.jar 前面用#号注释或者直接删掉即可。

sdk 通过 proguard 混淆代码时默认已经将 lib目录中的 jar 都已经添加到打包脚本中,所以不需要再次手动添加。

更多推荐

The same input jar is specified twice 解决办法

本文发布于:2024-03-23 20:14:59,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1742357.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:解决办法   input   jar

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!