2
我在我的Android項目中導入了aspectjtools.jar,但是當我運行該項目時(無論是否使用代碼中的.jar),eclipse顯示如下警告:在Android項目中使用aspectjtools.jar
[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分鐘後顯示警告,項目編譯但無法正常工作。
任何想法如何解決這個問題?
但是,我不是要導入AspectJ庫** aspectjrt.jar **,我跟着[http://deansserver.co.uk/~dean/2011/07/18/aspect-oriented- android-development-tool-integration /]這篇文章和這個庫的項目工作正常。當我導入** aspectjtools.jar **時出現問題。謝謝 – user1250075 2012-03-05 16:35:42
對不起,我很困惑,爲什麼你需要導入aspectjtools.jar到你的項目?如該文章中所述,它與AJDT方法有什麼不同? – seanhodges 2012-03-05 17:21:12