Android studio 2.2 Error:warning: Ignoring InnerClasses attribute for an anonymous inner class错误

来源:互联网 发布:iphone网络制式怎么看 编辑:程序博客网 时间:2024/05/21 00:20

在使用百度地图SDK开发的过程中报错,虽然不影响运行,但是不能打包。
报错如下:

Error:warning: Ignoring InnerClasses attribute for an anonymous inner classError:(com.baidu.location.a) that doesn't come with anError:associated EnclosingMethod attribute. This class was probably produced by aError:compiler that did not target the modern .class file format. The recommendedError:solution is to recompile the class from source, using an up-to-date compilerError:and without specifying any "-target" type options. The consequence of ignoringError:this warning is that reflective operations on this class will incorrectlyError:indicate that it is *not* an inner class.Error:warning: Ignoring InnerClasses attribute for an anonymous inner classError:(com.baidu.location.b) that doesn't come with anError:associated EnclosingMethod attribute. This class was probably produced by aError:compiler that did not target the modern .class file format. The recommendedError:solution is to recompile the class from source, using an up-to-date compilerError:and without specifying any "-target" type options. The consequence of ignoringError:this warning is that reflective operations on this class will incorrectlyError:indicate that it is *not* an inner class.Error:warning: Ignoring InnerClasses attribute for an anonymous inner classError:(com.baidu.location.a.k) that doesn't come with anError:associated EnclosingMethod attribute. This class was probably produced by aError:compiler that did not target the modern .class file format. The recommendedError:solution is to recompile the class from source, using an up-to-date compilerError:and without specifying any "-target" type options. The consequence of ignoringError:this warning is that reflective operations on this class will incorrectlyError:indicate that it is *not* an inner class.Error:warning: Ignoring InnerClasses attribute for an anonymous inner classError:(com.baidu.location.a.l) that doesn't come with anError:associated EnclosingMethod attribute. This class was probably produced by aError:compiler that did not target the modern .class file format. The recommendedError:solution is to recompile the class from source, using an up-to-date compilerError:and without specifying any "-target" type options. The consequence of ignoringError:this warning is that reflective operations on this class will incorrectlyError:indicate that it is *not* an inner class.Error:warning: Ignoring InnerClasses attribute for an anonymous inner classError:(com.baidu.location.a.m) that doesn't come with anError:associated EnclosingMethod attribute. This class was probably produced by aError:compiler that did not target the modern .class file format. The recommendedError:solution is to recompile the class from source, using an up-to-date compilerError:and without specifying any "-target" type options. The consequence of ignoringError:this warning is that reflective operations on this class will incorrectlyError:indicate that it is *not* an inner class.Error:warning: Ignoring InnerClasses attribute for an anonymous inner classError:(com.baidu.location.a.n) that doesn't come with anError:associated EnclosingMethod attribute. This class was probably produced by aError:compiler that did not target the modern .class file format. The recommendedError:solution is to recompile the class from source, using an up-to-date compilerError:and without specifying any "-target" type options. The consequence of ignoringError:this warning is that reflective operations on this class will incorrectlyError:indicate that it is *not* an inner class.Error:warning: Ignoring InnerClasses attribute for an anonymous inner classError:(com.baidu.location.a.o) that doesn't come with anError:associated EnclosingMethod attribute. This class was probably produced by aError:compiler that did not target the modern .class file format. The recommendedError:solution is to recompile the class from source, using an up-to-date compilerError:and without specifying any "-target" type options. The consequence of ignoringError:this warning is that reflective operations on this class will incorrectlyError:indicate that it is *not* an inner class.Error:warning: Ignoring InnerClasses attribute for an anonymous inner classError:(com.baidu.location.b.b.d) that doesn't come with anError:associated EnclosingMethod attribute. This class was probably produced by aError:compiler that did not target the modern .class file format. The recommendedError:solution is to recompile the class from source, using an up-to-date compilerError:and without specifying any "-target" type options. The consequence of ignoringError:this warning is that reflective operations on this class will incorrectlyError:indicate that it is *not* an inner class.Error:warning: Ignoring InnerClasses attribute for an anonymous inner classError:(com.baidu.location.c) that doesn't come with anError:associated EnclosingMethod attribute. This class was probably produced by aError:compiler that did not target the modern .class file format. The recommendedError:solution is to recompile the class from source, using an up-to-date compilerError:and without specifying any "-target" type options. The consequence of ignoringError:this warning is that reflective operations on this class will incorrectlyError:indicate that it is *not* an inner class.Error:warning: Ignoring InnerClasses attribute for an anonymous inner classError:(com.baidu.location.c.k) that doesn't come with anError:associated EnclosingMethod attribute. This class was probably produced by aError:compiler that did not target the modern .class file format. The recommendedError:solution is to recompile the class from source, using an up-to-date compilerError:and without specifying any "-target" type options. The consequence of ignoringError:this warning is that reflective operations on this class will incorrectlyError:indicate that it is *not* an inner class.Error:warning: Ignoring InnerClasses attribute for an anonymous inner classError:(com.baidu.location.c.i) that doesn't come with anError:associated EnclosingMethod attribute. This class was probably produced by aError:compiler that did not target the modern .class file format. The recommendedError:solution is to recompile the class from source, using an up-to-date compilerError:and without specifying any "-target" type options. The consequence of ignoringError:this warning is that reflective operations on this class will incorrectlyError:indicate that it is *not* an inner class.Error:warning: Ignoring InnerClasses attribute for an anonymous inner classError:(com.baidu.location.c.j) that doesn't come with anError:associated EnclosingMethod attribute. This class was probably produced by aError:compiler that did not target the modern .class file format. The recommendedError:solution is to recompile the class from source, using an up-to-date compilerError:and without specifying any "-target" type options. The consequence of ignoringError:this warning is that reflective operations on this class will incorrectlyError:indicate that it is *not* an inner class.Error:warning: Ignoring InnerClasses attribute for an anonymous inner classError:(com.baidu.location.c.l) that doesn't come with anError:associated EnclosingMethod attribute. This class was probably produced by aError:compiler that did not target the modern .class file format. The recommendedError:solution is to recompile the class from source, using an up-to-date compilerError:and without specifying any "-target" type options. The consequence of ignoringError:this warning is that reflective operations on this class will incorrectlyError:indicate that it is *not* an inner class.Error:warning: Ignoring InnerClasses attribute for an anonymous inner classError:(com.baidu.location.e.b) that doesn't come with anError:associated EnclosingMethod attribute. This class was probably produced by aError:compiler that did not target the modern .class file format. The recommendedError:solution is to recompile the class from source, using an up-to-date compilerError:and without specifying any "-target" type options. The consequence of ignoringError:this warning is that reflective operations on this class will incorrectlyError:indicate that it is *not* an inner class.Error:warning: Ignoring InnerClasses attribute for an anonymous inner classError:(com.baidu.location.e.c) that doesn't come with anError:associated EnclosingMethod attribute. This class was probably produced by aError:compiler that did not target the modern .class file format. The recommendedError:solution is to recompile the class from source, using an up-to-date compilerError:and without specifying any "-target" type options. The consequence of ignoringError:this warning is that reflective operations on this class will incorrectlyError:indicate that it is *not* an inner class.Error:warning: Ignoring InnerClasses attribute for an anonymous inner classError:(com.baidu.location.e.i) that doesn't come with anError:associated EnclosingMethod attribute. This class was probably produced by aError:compiler that did not target the modern .class file format. The recommendedError:solution is to recompile the class from source, using an up-to-date compilerError:and without specifying any "-target" type options. The consequence of ignoringError:this warning is that reflective operations on this class will incorrectlyError:indicate that it is *not* an inner class.Error:warning: Ignoring InnerClasses attribute for an anonymous inner class

解决办法:
在proguard-android.txt中加入:-keepattributes EnclosingMetho
如下:

-keepattributes EnclosingMethod#保证百度类不能被混淆,否则会出现网络不可用等运行时异常-keep class com.baidu.** {*;}-keep class vi.com.** {*;}-dontwarn com.baidu.**

问题解决,编译、运行、打包都没问题了~~

0 0