下载新版4.7的zip,解压缩,将原proguard目录打包备份,然后将4.7版的lib及bin目录覆盖sdk目录下的,然后再生成apk,居然成功。项目下产生了proguard文件夹及相应的一些文件。
但在另一个引用外部库的工程中打包apk时,发现报错
[proguard] Warning: there were 2 unresolved references to classes or interfaces. [proguard] You may need to specify additional library jars (using ‘-libraryjars’), [proguard] or perhaps the ‘-dontskipnonpubliclibraryclasses’ option. [proguard] Warning: there were 5 unresolved references to program class members. [proguard] Your input classes appear to be inconsistent. [proguard] You may need to recompile them and try again. [proguard] Alternatively, you may have to specify the options
总而言之是发现有警告错误。按要求在proguard.cfg中加入-dontskipnonpubliclibraryclasses 亦没有效果。忽略错误可以吗?官网问题处理中似有:try your luck with the -ignorewarnings option, or even the -dontwarn option的方法。将 -ignorewarnings 加入proguard.cfg,问题解决。
以后继续补充
原创文章,作者:苏葳,如需转载,请注明出处:https://www.swmemo.com/376.html