android studio 混淆错误

android studio 代码混淆打包错误 The same input jar is specified twice

使用android studio 以来,尚未使用过代码混淆打包,正好遇上项目立刻要上线,因此使用代码混淆打包 发现android studio 跟eclipse仍是有不一样地方android

为了方便 因此把以前eclipse中的proguard的文件直接copy过来  而后修改了一下进行打包 结果出现The same input jar is specified twice这个错误 而后也是很是困惑 ,因此只能在网上找答案了 其实主要缘由就是咱们在build.gradle文件中已经配置过jar文件了eclipse


因此在proguard文件中 如下内容能够删除或注释掉,我这里选择注释掉gradle


而后再次进行打包 不会在出现The same input jar is specified twice这个问题了ui

之前在用 eclipse 开发时,混淆配置文件中包含有 -libraryjars libs/eventbus.jar 的配置,用来保持 eventbus.jar 不被混淆。在 Android Studio 中, build.gradle 中声明了对这个 jar 包的依赖,则不须要在混淆配置文件中继续声明。spa

在将全部的 -libraryjars libs/*.jar 注释掉之后,项目能够正常混淆了。code

相关文章
相关标签/搜索