Thursday, December 2, 2010

"Conversion to Dalvik format failed with error 1"

Ugh. Don't you hate errors that aren't in the code, and don't go away no matter how many times you fix project setup or clean.

Heres what I got in the console:


[2010-12-02 10:38:10 - MDatHand] 
trouble processing "java/lang/Object.class":
[2010-12-02 10:38:10 - MDatHand] 
Attempt to include a core VM class in something other than a core library.
It is likely that you have attempted to include the core library from a desktop
virtual machine into an application, which will most assuredly not work. If
you really intend to build a core library -- which is only appropriate as
part of creating a full virtual machine binary, as opposed to compiling an
application -- then use the "--core-library" option to suppress this error
message. If you go ahead and use "--core-library" but are in fact building
an application, then please be aware that your build will still fail at some
point; you will simply be denied the pleasure of reading this helpful error
message.
[2010-12-02 10:38:10 - MDatHand] 1 error; aborting
[2010-12-02 10:38:10 - MDatHand] Conversion to Dalvik format failed with error 1

Oh yeah... this was certainly a real pleasure... jerk. The only thing I understand in all that garbage is "library" not that that give me any damn clue on how to fix it. How but just a nice error message that says "FIX YOUR LIBRARY SETTINGS"????? Anywho, I digress...

I did some soul searching on the interwebs, and a nice man by the name of Jim had posted a reasonable solution. I'm posting it herein the event the error pops up again again:

I received the following message and found several others who had seen
it but no solution. So I have included how I finally fixed it. (I'm
using Eclipse version 3.4.2 and Android 1.5.)

...
The fix for me was to go to my project's properties, select:

Java Build Path -> Libraries (tab)

Somehow, the android.jar had been added, and when I deleted it, all
was good. Note that the android.jar is included as part of the
Android 1.5 library, so this was a duplication.

How did this happen? I certainly didn't do it. But my app has blown
up a lot in the emulator, so who knows.

Later . . . Jim


THANKS JIM :]

No comments:

Post a Comment