生成Release-apk报错:The same input jar is specified twice 解决办法
2018-01-10 19:41
465 查看
本人遇到的情况是:Eclipse 导入 AS后 生成签名apk的时候报错
解决办法如下:
打开proguard.cfg (每个不一样 我的叫 proguard-project)
在所有的 -libraryjars 前面加上 # 变成 #-libraryjars xxxx.jar
原因分析:
原因是build.gradle文件配置了
里面已经添加过jar包,混淆文件proguard.cfg里面又加了句
sdk 通过 proguard 混淆代码时默认已经将 lib目录中的 jar 都已经添加到打包脚本中,所以不需要再次手动添加。
如果是进行了混淆的话:
这就是混淆文件里面重复导入jar包了,把混淆文件中的导入:-libraryjars libs/***.jar 注释掉
解决办法如下:
dependencies { compile fileTree(include: '*.jar', dir: 'libs') }
打开proguard.cfg (每个不一样 我的叫 proguard-project)
在所有的 -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 都已经添加到打包脚本中,所以不需要再次手动添加。
如果是进行了混淆的话:
这就是混淆文件里面重复导入jar包了,把混淆文件中的导入:-libraryjars libs/***.jar 注释掉
相关文章推荐
- The same input jar is specified twice 解决办法
- android打包时The same input jar is specified twice 解决办法
- 解决The same input jar alipaySingle-20170510.jar] is specified twice.
- 解决 The same input jar is specified twice 问题
- Android Studio 'The same input jar is specified twice'
- the same input jar is specified twice
- java.io.IOException: The same input jar [E:\Jre\lib\rt.jar] is specified twice.
- AndroidApk混淆编译时,报告java.io.IOException: The same input jar[xxx/xxx.jar]is specified twice.
- Android打包混淆报The same input jar [*.jar] is specified twice 的错误
- java.io.IOException: The same input jar [***\libs\android-support-v4.jar] is specified twice
- java.io.IOException: The same input jar [***\libs\javastruct-0.1.jar] is specified twice
- android studio 代码混淆如何忽略第三方jar包 The same input jar is specified twice
- The same input jar ***.jar is specified twice
- android studio 代码混淆打包错误 The same input jar is specified twice
- java.io.IOException: The same input jar XXX is specified twice
- android studio 代码混淆打包错误 The same input jar is specified twice
- Android stuido 打包 The same input jar is specified twice 问题
- java.io.IOException: The same input jar is specified twice”
- java.io.IOException: The same input jar is specified twice
- The function getUserId must be used with a prefix when a default namespace is not specified 解决办法