Eclipse &引用;忽略InnerClasses属性“;警告正在扼杀日食
我有几个导入的JAR在项目构建时在Eclipse中出现此错误:Eclipse &引用;忽略InnerClasses属性“;警告正在扼杀日食,eclipse,apache,jar,maven,Eclipse,Apache,Jar,Maven,我有几个导入的JAR在项目构建时在Eclipse中出现此错误: [2011-04-08 16:31:48 - MokbeeAndroid] Dx warning: Ignoring InnerClasses attribute for an anonymous inner class (net.sf.antcontrib.logic.ForEach$1) that doesn't come with an associated EnclosingMethod attribute. This cl
[2011-04-08 16:31:48 - MokbeeAndroid] Dx warning: Ignoring InnerClasses attribute for an anonymous inner class
(net.sf.antcontrib.logic.ForEach$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.
一开始我并不在乎,因为没有错误。但我现在添加了Apache Sanselan,它也有同样的问题。其他ApacheJAR也这样做,不仅每个jar一次,而且每个具有内部类的类一次,这使得每个构建都会输出一个巨大的控制台日志。更糟糕的是,每个警告似乎都会减慢Eclipse构建过程,最终Eclipse只是由于内存溢出错误而崩溃。这是我无法构建任何东西的时刻,即使是在我的计算机启动之后
解决方案似乎是重新编译源代码(开源和所有),但除了Maven之外,其他任何东西都无法重新编译,在这样做没有任何效果之后,我怀疑首先是Maven造成了问题
我不在乎警告的结果,只是Eclipse没有把所有的内存都花在告诉我这件事上。那么,有没有一种方法可以消除这个问题,或者让Eclipse停止慢下来(可能跳过这个检查)?如果您在Maven中重新编译库的源代码,您可能需要将POMs中的Java版本更新为1.6(或者您在项目中使用的任何Java版本)。仅从Sanselan来看,我注意到它的版本是1.4。这让我对
android maven插件
和其他包含commons日志的库感到非常痛苦。它挡住了我的身材。更糟糕的是,有些库是以传递方式包含的,因此简单地使用
是不可行的。有了来自的一点提示,我决定我可以用这样的东西将冒犯的库完全排除在外:
<!-- prevent commons-logging from being included by the Google HTTP client
dependencies -->
<dependency>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
<version>1.1.1</version>
<scope>provided</scope>
</dependency>
公用记录
公用记录
1.1.1
假如
可能是相关的,这也可能是由Check Style插件引起的。啊,太棒了。就是这样。谢谢不过这有点奇怪。您可能会认为Apache将使用最新的Java版本。不幸的是,我不能再接受这个答案了,因为重新编译类完全违背了拥有Maven的目的,我再也不能这样做了。@AlbeyAmakiir很抱歉听到您仍然有麻烦。重新编译是一件痛苦的事情,但您只需要对有限数量的依赖项执行此操作。你是否使用Nexus这样的repo来存储重新编译的版本?相关问题:Garret,我的问题是我无法用你使用的方法解决它。我还在调查。似乎是机器人分子的依赖性导致了这一切……非常感谢!我的具体问题是,我忘了将robolectric标记为scope test->它拉取了几个依赖项,这些依赖项导致了这个错误,并在它们之间共享了日志记录!