1. Download our Official Android App: Forums for Android!

Apps Lost in Ch 6 of "Learning Android"

Discussion in 'Android Development' started by GTbrewer, May 8, 2011.

  1. GTbrewer

    GTbrewer Well-Known Member
    Thread Starter
    Rank:
    None
    Points:
    56
    Posts:
    106
    Joined:
    Apr 25, 2011

    Apr 25, 2011
    106
    5
    56
    Male
    WAS Sr.. NetworkEngineer, then 16th Special Operat
    Fort Walton Beach, FL
    EDIT 10 May 2011 0650 CDT: This part of the post is no longer relevant. I found and fixed the error that
    was causing the errors here using diff to compare my code vs the online code from the book. The question
    now involves the Eclipse errors (at least, they *LOOK* like internal Eclipse errors to me) in my follow-up
    post below. Then again, the author DID say there would be errors...maybe it wasn't supposed to build
    yet.

    ====================================================================================

    [no longer relevant, so I nuked this part to avoid wasting space here --jim]
     

    Advertisement

  2. GTbrewer

    GTbrewer Well-Known Member
    Thread Starter
    Rank:
    None
    Points:
    56
    Posts:
    106
    Joined:
    Apr 25, 2011

    Apr 25, 2011
    106
    5
    56
    Male
    WAS Sr.. NetworkEngineer, then 16th Special Operat
    Fort Walton Beach, FL
    Ok, I did a few diffs, comparing my code to the book's code (nice having it online!), and found this typo:
    <TextView android:id="@+id/textView" -android:layout_height="wrap_content"
    ^
    That '-' isn't supposed to be there. That, and things like android.layout_height and _width, etc.,
    weren't in the same order, but I can't imagine that being a problem. So apparently, that one '-' killed
    everything from that point forward. It shows no errors now, but when I try to build it, I get the following,
    which *REALLY* don't understand:

    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(ClassDefsSection.java:123)
    [2011-05-09 23:32:11 - Yamba] Dx at com.android.dx.dex.file.DexFile.add(DexFile.java:143)
    [2011-05-09 23:32:11 - Yamba] Dx at com.android.dx.command.dexer.Main.processClass(Main.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.processFileBytes(Main.java:294)
    [2011-05-09 23:32:11 - Yamba] Dx at com.android.dx.cf.direct.ClassPathOpener.processArchive(ClassPathOpener.java:244)
    [2011-05-09 23:32:11 - Yamba] Dx at com.android.dx.cf.direct.ClassPathOpener.processOne(ClassPathOpener.java:130)
    [2011-05-09 23:32:11 - Yamba] Dx at com.android.dx.cf.direct.ClassPathOpener.process(ClassPathOpener.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:185)
    [2011-05-09 23:32:11 - Yamba] Dx at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    [2011-05-09 23:32:11 - Yamba] Dx at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    [2011-05-09 23:32:11 - Yamba] Dx at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown 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.DexWrapper.run(DexWrapper.java:179)
    [2011-05-09 23:32:11 - Yamba] Dx at com.android.ide.eclipse.adt.internal.build.BuildHelper.executeDx(BuildHelper.java:585)
    [2011-05-09 23:32:11 - Yamba] Dx at com.android.ide.eclipse.adt.internal.build.builders.PostCompilerBuilder.build(PostCompilerBuilder.java:490)
    [2011-05-09 23:32:11 - Yamba] Dx at org.eclipse.core.internal.events.BuildManager$2.run(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.basicBuild(BuildManager.java:170)
    [2011-05-09 23:32:11 - Yamba] Dx at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:201)
    [2011-05-09 23:32:11 - Yamba] Dx at org.eclipse.core.internal.events.BuildManager$1.run(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.basicBuild(BuildManager.java:256)
    [2011-05-09 23:32:11 - Yamba] Dx at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:309)
    [2011-05-09 23:32:11 - Yamba] Dx at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:341)
    [2011-05-09 23:32:11 - Yamba] Dx at org.eclipse.core.internal.resources.Workspace.build(Workspace.java:330)
    [2011-05-09 23:32:11 - Yamba] Dx at org.eclipse.ui.actions.GlobalBuildAction$1.run(GlobalBuildAction.java:178)
    [2011-05-09 23:32:11 - Yamba] Dx at org.eclipse.core.internal.jobs.Worker.run(Worker.java: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?
     

Share This Page

Loading...