androidstudio 解决Error:warning: Ignoring InnerClasses attribute for an anonymous inner

来源:互联网 发布:淘宝美工在哪里学 编辑:程序博客网 时间:2024/04/27 16:01
用androidstudio 编写项目时引入第三方的包出现以下编译错误

Error:warning: Ignoring InnerClasses attribute for an anonymous inner class  
Error:(com.tencent.mm.sdk.b.c) 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.
Error:warning: Ignoring InnerClasses attribute for an anonymous inner class
Error:(com.tencent.mm.sdk.diffdev.a.b) 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.
Error:warning: Ignoring InnerClasses attribute for an anonymous inner class
等多个内部类出现错误,这是在引用第三方sdk时出现的问题。
我在proguard-rules.pro中加上了以下代码,将问题解决了不显示错误了。
#-keepattributes EnclosingMethod
#-kee#-downwarn com.tencent.mm.sdk.**#-keep class com.tencent.mm.sdk.**{*;}

0 0