"忽略InnerClasses属性"警告杀害的Eclipse [英] "Ignoring InnerClasses attribute" warning is killing Eclipse

查看:616
本文介绍了"忽略InnerClasses属性"警告杀害的Eclipse的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有几个罐子的进口有在Eclipse这个错误时,生成项目:

I have a couple of imported jars that have this error in Eclipse when the project builds:

[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,它有同样的问题。其他Apache的罐子也这样做,不只是一次每罐,但每一次的类的,有-AN-内部类,这使得每个版本泵出一个可怕的控制台日志。更糟的是,每个警告似乎慢了Eclipse构建过程,并最终Eclipse的崩溃只是由于内存溢出错误。这是在那里我可以不建任何东西,我的电脑开机后,即使连续的地步。

Now, I didn't really care at first, because there were no errors. But I've now added Apache Sanselan, which has the same problem. Other Apache jars also do this, and not just once per jar, but once per class-that-has-an-inner-class, which makes every build pump out a monstrous console log. Worse, each warning seems to slow the Eclipse build process, and eventually Eclipse just crashes due to a memory overflow error. It's at the point where I can't build anything, even straight after my computer starts up.

解决方案似乎是重新编译源(开放源代码和所有),但没有它可以在任何东西,但Maven的,它这样做没有效果后,我怀疑导致在问题被重新编译第一位。

The solution would seem to be to recompile the source (open-source and all), but none of it can be recompiled in anything but Maven, which, after doing so to no avail, I suspect is causing the problem in the first place.

我不关心的警告的结果,仅仅是Eclipse不把所有它的内存就告诉我这件事。那么,有没有一种方法,我可以删除的问题,的的使Eclipse中停止它减慢(跳过检查,也许)?

I don't care about the results of the warning, just that Eclipse doesn't spend all it's memory on telling me about it. So, is there a way I can either remove the problem, or make Eclipse stop slowing down on it (skipping that check, maybe)?

推荐答案

这是造成我很多与 Android的Maven的插件及其他库,其中包括痛苦的commons-logging 。它挡住了我的构建。是什么让事情变得更糟的是,一些文库传递地包括在内,所以单纯用<&排除GT; 是行不通的。从另一个帖子,我确定我可以像这样的东西完全保持了违规库:

This was causing me a lot of pain with the android-maven-plugin and other libraries that included commons-logging. It was blocking my build. What made it worse is that some libraries were included transitively, so simply using <exclude> would not work. With a little hint from another post, I determined I could keep out the offending library altogether with something like this:

    <!-- 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>

这篇关于&QUOT;忽略InnerClasses属性&QUOT;警告杀害的Eclipse的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆