在Android Studio中构建我的代码时,我有这个警告.很少有时候它们没有出现,但大多数时候都没有.
warning: Ignoring InnerClasses attribute for an anonymous inner class
(jnamed$1) that doesn't come with an
associated EnclosingMethod attribute. This class was probably produced by a
compiler that did not target the modern .class file format. The recommended
solution is to recompile the class from source, using an up-to-date compiler
and without specifying any "-target" type options. The consequence of ignoring
this warning is that reflective operations on this class will incorrectly
indicate that it is *not* an inner class.
warning: Ignoring InnerClasses attribute for an anonymous inner class
(jnamed$2) that doesn't come with an
associated EnclosingMethod attribute. This class was probably produced by a
compiler that did not target the modern .class file format. The recommended
solution is to recompile the class from source, using an up-to-date compiler
and without specifying any "-target" type options. The consequence of ignoring
this warning is that reflective operations on this class will incorrectly
indicate that it is *not* an inner class.
warning: Ignoring InnerClasses attribute for an anonymous inner class
(jnamed$3) that doesn't come with an
associated EnclosingMethod attribute. This class was probably produced by a
compiler that did not target the modern .class file format. The recommended
solution is to recompile the class from source, using an up-to-date compiler
and without specifying any "-target" type options. The consequence of ignoring
this warning is that reflective operations on this class will incorrectly
indicate that it is *not* an inner class.
我已经阅读了其他问题并将其包含在我的proguard文件中:
-keepattributes EnclosingMethod
-keepattributes InnerClasses
然而,他们没有帮助.
编辑:
如果无法解决此问题,请告诉我如何在postguard(或任何其他方式)中隐藏此警告.谢谢!
解决方法:
是什么导致了这个问题?
您正在尝试在运行Android的运行时Dalvik的JVM中使用未针对Java 6或7编译的类文件.这不是一个大问题,你不必担心.
我该如何解决?
您可以重新编译导致该问题的库.不幸的是,该库已经在一个已编译的jar中.您可以尝试在线查找其源代码,然后进行编译