我已经在我的 Android 项目中导入了 aspectjtools.jar,但是当我运行该项目时(无论我是否在代码中使用 .jar),eclipse 都会显示以下警告:
[2012-03-05 16:34:20 - AndroidExample] Dx warning: Ignoring InnerClasses attribute for an anonymous inner class
(org.aspectj.ajdt.internal.compiler.CompilerAdapter$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.
[2012-03-05 16:34:20 - AndroidExample] Dx warning: Ignoring InnerClasses attribute for an anonymous inner class
(org.aspectj.org.eclipse.jdt.core.ClasspathContainerInitializer$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.
多次显示相同的警告后,Eclipse 停止工作,我必须重新启动它。
我尝试使用 Maven,但它显示了相同的警告,在显示警告 1 分钟后,项目编译但无法正常工作。
知道如何解决这个问题吗?
最佳答案
您显然需要修改 Eclipse 配置,以便在字节码编译和转换为 Android .dex 格式之间进行交织。参见 this article .
关于android - 在 Android 项目中使用 aspectjtools.jar,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9569799/