http://www.cnblogs.com/BlueVienna/archive/2012/05/28/2520902.html
工程上有红叉,不知道少了什么,但是袋中却没有任何错误,运行程序报错为:
我要运行的时候报错控制台打印UNEXPECTED TOP-LEVEL EXCEPTION:
java.lang.IllegalArgumentException: already added: Lcom/kenai/jbosh/AbstractAttr;
[2011-05-11 10:13:02 - Wildgoose] Dx at com.android.dx.dex.file.ClassDefsSection.add(ClassDefsSection.java:123)
[2011-05-11 10:13:02 - Wildgoose] Dx at com.android.dx.dex.file.DexFile.add(DexFile.java:143)
[2011-05-11 10:13:02 - Wildgoose] Dx at com.android.dx.command.dexer.Main.processClass(Main.java:372)
[2011-05-11 10:13:02 - Wildgoose] Dx at com.android.dx.command.dexer.Main.processFileBytes(Main.java:346)
[2011-05-11 10:13:02 - Wildgoose] Dx at com.android.dx.command.dexer.Main.access$400(Main.java:59)
[2011-05-11 10:13:02 - Wildgoose] Dx at com.android.dx.command.dexer.Main$1.processFileBytes(Main.java:294)
[2011-05-11 10:13:02 - Wildgoose] Dx at com.android.dx.cf.direct.ClassPathOpener.processArchive(ClassPathOpener.java:244)
[2011-05-11 10:13:02 - Wildgoose] Dx at com.android.dx.cf.direct.ClassPathOpener.processOne(ClassPathOpener.java:130)
[2011-05-11 10:13:02 - Wildgoose] Dx at com.android.dx.cf.direct.ClassPathOpener.process(ClassPathOpener.java:108)
[2011-05-11 10:13:02 - Wildgoose] Dx at com.android.dx.command.dexer.Main.processOne(Main.java:313)
[2011-05-11 10:13:02 - Wildgoose] Dx at com.android.dx.command.dexer.Main.processAllFiles(Main.java:233)
[2011-05-11 10:13:02 - Wildgoose] Dx at com.android.dx.command.dexer.Main.run(Main.java:185)
[2011-05-11 10:13:02 - Wildgoose] Dx at sun.reflect.GeneratedMethodAccessor13.invoke(Unknown Source)
[2011-05-11 10:13:02 - Wildgoose] Dx at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
[2011-05-11 10:13:02 - Wildgoose] Dx at java.lang.reflect.Method.invoke(Method.java:597)
[2011-05-11 10:13:02 - Wildgoose] Dx at com.android.ide.eclipse.adt.internal.build.DexWrapper.run(DexWrapper.java:179)
[2011-05-11 10:13:02 - Wildgoose] Dx at com.android.ide.eclipse.adt.internal.build.BuildHelper.executeDx(BuildHelper.java:585)
[2011-05-11 10:13:02 - Wildgoose] Dx at com.android.ide.eclipse.adt.internal.build.builders.PostCompilerBuilder.build(PostCompilerBuilder.java:490)
[2011-05-11 10:13:02 - Wildgoose] Dx at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:627)
[2011-05-11 10:13:02 - Wildgoose] Dx at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
[2011-05-11 10:13:02 - Wildgoose] Dx at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:170)
[2011-05-11 10:13:02 - Wildgoose] Dx at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:201)
[2011-05-11 10:13:02 - Wildgoose] Dx at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:253)
[2011-05-11 10:13:02 - Wildgoose] Dx at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
[2011-05-11 10:13:02 - Wildgoose] Dx at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:256)
[2011-05-11 10:13:02 - Wildgoose] Dx at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:309)
[2011-05-11 10:13:02 - Wildgoose] Dx at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:341)
[2011-05-11 10:13:02 - Wildgoose] Dx at org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBuildJob.java:140)
[2011-05-11 10:13:02 - Wildgoose] Dx at org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJob.java:238)
[2011-05-11 10:13:02 - Wildgoose] Dx at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
[2011-05-11 10:13:02 - Wildgoose] Dx 1 error; aborting
[2011-05-11 10:13:02 - Wildgoose] Conversion to Dalvik format failed with error 1
和一个Your project contains error(s), please fix them before running your application.提示框...
网上很多说是因为包重复,我的问题其实是AbstractAttr这个类重复加载了,由于我的android项目中引入了一个java项目,而俩个项目中都含有一个相同的类,包名也一样,就出现这个错误!调了我俩天啊,终于出来了,累死我了!