Error:warning: Ignoring InnerClasses attribute for an anonymous inner class Error:(com.xx.xx

参考链接:https://blog.csdn.net/lvshuchangyin/article/details/51803154

rror:warning: Ignoring InnerClasses attribute for an anonymous inner class
Error:(com.unionpay.mobile.android.pboctransaction.a) that doesn’t come with an
Error:associated EnclosingMethod attribute. This class was probably produced by a
Error:compiler that did not target the modern .class file format. The recommended
Error:solution is to recompile the class from source, using an up-to-date compiler
Error:and without specifying any “-target” type options. The consequence of ignoring
Error:this warning is that reflective operations on this class will incorrectly
Error:indicate that it is not an inner class.

大概长上面那样。

这种错误可能会影响打包以及功能,没有无缘无故的错误提示,尽量排查。
1. 大概方向,有类重复引用。比如第三方的jar包里面包含了你工程中已有jar包。可以检查一下jar包。

  1. keystore密码错误。

  2. 发现jar包内含有反射等地方,会出现此类错误,因stuido生成app时是混淆的,所以请添加混淆规则
    在proguard-rules.pro中添加
    -keepattributes Signature
    -keepattributes EnclosingMethod

  3. 此错误只在第一次clean后安装APP出现,打包和之后都不出现,怀疑这种方式可能是as有bug?clean后未生成文件就去检查错误????????

关于此类错误提示,谁有新的解决方案的也请分享下。

最后我是通过如下方式解决的:

在proguard-rules.pro中添加
-keepattributes Signature
-keepattributes EnclosingMethod

你可能感兴趣的:(异常信息搜集)