android - 在 Android 项目中使用 aspectjtools.jar

标签 android aspectj

我已经在我的 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/

相关文章:

php - Xampp 服务器中的所有 php 项目应该放在哪里?

Android 媒体编解码器类型 "video/mp4v-es"- 是否与 MPEG-4 第 2 部分(MPEG-4 视觉效果)相同?

android - 如何剥离 3-rd 方网站以便在移动设备上更好地显示?

java - Spring 加载时间编织不检测用@configurable注释的类

java - 具有特定注释的类的所有方法的@AspectJ 切入点

intellij-idea - 在intellij idea中设置aspectj weaver的编译级别

java - 建议 spring mvc http 消息转换器

java - Gradle buildConfigField : Syntax for arrays & maps?

android - ScrollView 内的 ListView 仅显示一个列表项?如何显示所有列表项

java - 是否可以检索执行 AspectJ 方法调用的对象实例?