开发者

IllegalArgumentException using Honeycomb compatibility package

开发者 https://www.devze.com 2023-02-19 19:40 出处:网络
I added the compatibility .jar to my proje开发者_开发知识库ct (the one to use fragments etc) but now every time I build my app Eclipse throws the error below. I added it by copying the .jar into the l

I added the compatibility .jar to my proje开发者_开发知识库ct (the one to use fragments etc) but now every time I build my app Eclipse throws the error below. I added it by copying the .jar into the libs/ folder and then used Add Jar... in the Project Properties dialog. Am I doing this right?

[TimetableHC] Dx 
UNEXPECTED TOP-LEVEL EXCEPTION:
java.lang.IllegalArgumentException: already added: Landroid/support/v4/app/ActivityCompatHoneycomb;
[TimetableHC] Dx  at com.android.dx.dex.file.ClassDefsSection.add(ClassDefsSection.java:123)
[TimetableHC] Dx  at com.android.dx.dex.file.DexFile.add(DexFile.java:143)
[TimetableHC] Dx  at com.android.dx.command.dexer.Main.processClass(Main.java:372)
[TimetableHC] Dx  at com.android.dx.command.dexer.Main.processFileBytes(Main.java:346)
[TimetableHC] Dx  at com.android.dx.command.dexer.Main.access$400(Main.java:59)
[TimetableHC] Dx  at com.android.dx.command.dexer.Main$1.processFileBytes(Main.java:294)
[TimetableHC] Dx  at com.android.dx.cf.direct.ClassPathOpener.processArchive(ClassPathOpener.java:244)
[TimetableHC] Dx  at com.android.dx.cf.direct.ClassPathOpener.processOne(ClassPathOpener.java:130)
[TimetableHC] Dx  at com.android.dx.cf.direct.ClassPathOpener.process(ClassPathOpener.java:108)
[TimetableHC] Dx  at com.android.dx.command.dexer.Main.processOne(Main.java:313)
[TimetableHC] Dx  at com.android.dx.command.dexer.Main.processAllFiles(Main.java:233)
[TimetableHC] Dx  at com.android.dx.command.dexer.Main.run(Main.java:185)
[TimetableHC] Dx  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[TimetableHC] Dx  at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
[TimetableHC] Dx  at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
[TimetableHC] Dx  at java.lang.reflect.Method.invoke(Unknown Source)
[TimetableHC] Dx  at com.android.ide.eclipse.adt.internal.build.DexWrapper.run(DexWrapper.java:179)
[TimetableHC] Dx  at com.android.ide.eclipse.adt.internal.build.BuildHelper.executeDx(BuildHelper.java:585)
[TimetableHC] Dx  at com.android.ide.eclipse.adt.internal.build.builders.PostCompilerBuilder.build(PostCompilerBuilder.java:490)
[TimetableHC] Dx  at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:629)
[TimetableHC] Dx  at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
[TimetableHC] Dx  at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:172)
[TimetableHC] Dx  at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:203)
[TimetableHC] Dx  at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:255)
[TimetableHC] Dx  at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
[TimetableHC] Dx  at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:258)
[TimetableHC] Dx  at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:220)
[TimetableHC] Dx  at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:362)
[TimetableHC] Dx  at org.eclipse.core.internal.resources.Project$1.run(Project.java:545)
[TimetableHC] Dx  at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1975)
[TimetableHC] Dx  at org.eclipse.core.internal.resources.Project.internalBuild(Project.java:524)
[TimetableHC] Dx  at org.eclipse.core.internal.resources.Project.build(Project.java:115)
[TimetableHC] Dx  at com.android.ide.eclipse.adt.internal.launch.LaunchConfigDelegate.launch(LaunchConfigDelegate.java:145)
[TimetableHC] Dx  at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:853)
[TimetableHC] Dx  at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:702)
[TimetableHC] Dx  at org.eclipse.debug.internal.ui.DebugUIPlugin.buildAndLaunch(DebugUIPlugin.java:923)
[TimetableHC] Dx  at org.eclipse.debug.internal.ui.DebugUIPlugin$8.run(DebugUIPlugin.java:1126)
[TimetableHC] Dx  at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
[TimetableHC] Dx 1 error; aborting
[TimetableHC] Conversion to Dalvik format failed with error 1


Your described process is correct. However, the Android build tools think you have added it twice. Did you also add it as an Android library project that your project is referencing, or something?

0

精彩评论

暂无评论...
验证码 换一张
取 消