忽略匿名内部类的InnerClasses属性

时间:2016-05-12 04:41:01

标签: android gradle android-studio-2.0

当我构建项目时,gradle会向我显示许多错误,如下所示: error pic

我已经搜索了很多解决方案,但没有人是正确的解决方案。

例如,添加“-keepattributes EnclosingMethod”,添加“-keepattributes InnerClasses”......

我使用的是Android版的2.0版,新版本是否出现错误?

希望有所帮助,谢谢

更新:

错误日志:

Error:warning: Ignoring InnerClasses attribute for an anonymous inner class
Error:(com.baidu.location.BDLocation$1) 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.

0 个答案:

没有答案