I'd check for two different jars containing the same class. I didn't get that specific error before about json, but I seem to remember the dalvik message.
Not sure if it would help, but I am curious what the entries are of your .classpath file in the project folder. You'll probably have the src/gen as src folders, but what, if any, "lib" entries do you have? On Wed, May 11, 2011 at 8:45 AM, Spooky <[email protected]> wrote: > I'm getting the following when trying to build the "Yamba" project > from the "Learning Android" book (I'm in the middle > of Chapter 6 right now). I'm using Eclipse version 3.5 (Galileo) and > release 11 (just updated yesterday, no change in error > messages from release 10) of the Android SDK on windows XP. No errors > show up in any of the source in Eclipse, but > when I try to build the project, I get the following: > > UNEXPECTED TOP-LEVEL EXCEPTION: > java.lang.IllegalArgumentException: already added: Lorg/json/ > JSONArray; > [2011-05-09 23:32:11 - Yamba] Dx at > com.android.dx.dex.file.ClassDefsSection.add(Class DefsSection.java: > 123) > [2011-05-09 23:32:11 - Yamba] Dx at > com.android.dx.dex.file.DexFile.add(DexFile.java:1 43) > [2011-05-09 23:32:11 - Yamba] Dx at > com.android.dx.command.dexer.Main.processClass(Mai n.java:372) > [2011-05-09 23:32:11 - Yamba] Dx at > com.android.dx.command.dexer.Main.processFileBytes (Main.java:346) > [2011-05-09 23:32:11 - Yamba] Dx at > com.android.dx.command.dexer.Main.access$400(Main. java:59) > [2011-05-09 23:32:11 - Yamba] Dx at com.android.dx.command.dexer.Main > $1.processFileByt es(Main.java:294) > [2011-05-09 23:32:11 - Yamba] Dx at > com.android.dx.cf.direct.ClassPathOpener.processAr > chive(ClassPathOpener.java:244) > [2011-05-09 23:32:11 - Yamba] Dx at > com.android.dx.cf.direct.ClassPathOpener.processOn > e(ClassPathOpener.java:130) > [2011-05-09 23:32:11 - Yamba] Dx at > com.android.dx.cf.direct.ClassPathOpener.process(C lassPathOpener.java: > 108) > [2011-05-09 23:32:11 - Yamba] Dx at > com.android.dx.command.dexer.Main.processOne(Main. java:313) > [2011-05-09 23:32:11 - Yamba] Dx at > com.android.dx.command.dexer.Main.processAllFiles( Main.java:233) > [2011-05-09 23:32:11 - Yamba] Dx at > com.android.dx.command.dexer.Main.run(Main.java:18 5) > [2011-05-09 23:32:11 - Yamba] Dx at > sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method) > [2011-05-09 23:32:11 - Yamba] Dx at > sun.reflect.NativeMethodAccessorImpl.invoke(Unknow n Source) > [2011-05-09 23:32:11 - Yamba] Dx at > sun.reflect.DelegatingMethodAccessorImpl.invoke(Un known Source) > [2011-05-09 23:32:11 - Yamba] Dx at > java.lang.reflect.Method.invoke(Unknown Source) > [2011-05-09 23:32:11 - Yamba] Dx at > com.android.ide.eclipse.adt.internal.build.DexWrap > per.run(DexWrapper.java:179) > [2011-05-09 23:32:11 - Yamba] Dx at > com.android.ide.eclipse.adt.internal.build.BuildHe > lper.executeDx(BuildHelper.java:585) > [2011-05-09 23:32:11 - Yamba] Dx at > com.android.ide.eclipse.adt.internal.build.builder > s.PostCompilerBuilder.build(PostCompilerBuilder.ja va:490) > [2011-05-09 23:32:11 - Yamba] Dx at > org.eclipse.core.internal.events.BuildManager$2.ru n(BuildManager.java: > 627) > [2011-05-09 23:32:11 - Yamba] Dx at > org.eclipse.core.runtime.SafeRunner.run(SafeRunner .java:42) > [2011-05-09 23:32:11 - Yamba] Dx at > org.eclipse.core.internal.events.BuildManager.basi > cBuild(BuildManager.java:170) > [2011-05-09 23:32:11 - Yamba] Dx at > org.eclipse.core.internal.events.BuildManager.basi > cBuild(BuildManager.java:201) > [2011-05-09 23:32:11 - Yamba] Dx at > org.eclipse.core.internal.events.BuildManager$1.ru n(BuildManager.java: > 253) > [2011-05-09 23:32:11 - Yamba] Dx at > org.eclipse.core.runtime.SafeRunner.run(SafeRunner .java:42) > [2011-05-09 23:32:11 - Yamba] Dx at > org.eclipse.core.internal.events.BuildManager.basi > cBuild(BuildManager.java:256) > [2011-05-09 23:32:11 - Yamba] Dx at > org.eclipse.core.internal.events.BuildManager.basi > cBuildLoop(BuildManager.java:309) > [2011-05-09 23:32:11 - Yamba] Dx at > org.eclipse.core.internal.events.BuildManager.buil d(BuildManager.java: > 341) > [2011-05-09 23:32:11 - Yamba] Dx at > org.eclipse.core.internal.resources.Workspace.buil d(Workspace.java: > 330) > [2011-05-09 23:32:11 - Yamba] Dx at > org.eclipse.ui.actions.GlobalBuildAction$1.run(Glo balBuildAction.java: > 178) > [2011-05-09 23:32:11 - Yamba] Dx at > org.eclipse.core.internal.jobs.Worker.run(Worker.j ava:55) > [2011-05-09 23:32:11 - Yamba] Dx 1 error; aborting > [2011-05-09 23:32:11 - Yamba] Conversion to Dalvik format failed with > error 1 > > > Can anyone translate this and point me to either the problem or TFM > for me to 'R/ead? > > -- > You received this message because you are subscribed to the Google > Groups "Android Developers" group. > To post to this group, send email to [email protected] > To unsubscribe from this group, send email to > [email protected] > For more options, visit this group at > http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

