Android 警告 - 忽略 InnerClasses 属性(jnamed)
Android Warning - Ignoring InnerClasses attribute (jnamed)
我在 Android Studio 中构建我的代码时收到此警告。
它们很少出现,但大部分时间都会出现。
warning: Ignoring InnerClasses attribute for an anonymous inner class
(jnamed) 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) 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) 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.
我已阅读其他问题并将其包含在我的混淆文件中:
-keepattributes EnclosingMethod
-keepattributes InnerClasses
然而他们没有帮助。
编辑:
如果无法解决这个问题,请告诉我如何在postguard(或任何其他方式)中隐藏这个警告。谢谢!
是什么原因造成的?
您正在尝试在运行 Android 运行时 Dalvik 的 JVM 中使用未针对 Java 6 或 7 编译的 class 文件。不是什么大问题,不用担心。
我该如何解决?
您可以重新编译导致问题的库。不幸的是,该库已经在编译的 jar 中。你可以尝试在网上寻找它的源码然后编译那个
您是否考虑过更新 JDK 和 JRE?还有,你把Android studio更新到最新版本了吗?执行其中任何一项任务都可以解决问题。在 sdk manger 中卸载并重新安装 proguard 也可能有帮助。
我在 Android Studio 中构建我的代码时收到此警告。
它们很少出现,但大部分时间都会出现。
warning: Ignoring InnerClasses attribute for an anonymous inner class
(jnamed) 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) 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) 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.
我已阅读其他问题并将其包含在我的混淆文件中:
-keepattributes EnclosingMethod
-keepattributes InnerClasses
然而他们没有帮助。
编辑:
如果无法解决这个问题,请告诉我如何在postguard(或任何其他方式)中隐藏这个警告。谢谢!
是什么原因造成的?
您正在尝试在运行 Android 运行时 Dalvik 的 JVM 中使用未针对 Java 6 或 7 编译的 class 文件。不是什么大问题,不用担心。
我该如何解决?
您可以重新编译导致问题的库。不幸的是,该库已经在编译的 jar 中。你可以尝试在网上寻找它的源码然后编译那个
您是否考虑过更新 JDK 和 JRE?还有,你把Android studio更新到最新版本了吗?执行其中任何一项任务都可以解决问题。在 sdk manger 中卸载并重新安装 proguard 也可能有帮助。