"Conversion to Dalvik format failed" error not going away
"Conversion to Dalvik format faile开发者_JAVA百科d: unable to execute dex: wrapper was not properly loaded first"
I am getting this error with my project in eclipse, and I searched for it and all answers say it's a problem with .jar file conflicts, and to clean the project and it should work. There is only one .jar file in the library, and cleaning it didn't make it go away. In fact, I cleaned all projects, and it made the same error occur on my other projects!! I haven't done anything with Eclipse since the last time I successfully ran my project. I went to the store, came back and tried to run it again, and got this error. I downloaded OEM drivers for a new Asus tablet, but I don't think that did it... They're still in my downloads folder! What happened??
Just try to use directly DX utility (converter from JVM bytecode to Dalvik VM bytecode) instead of relying upon Eclipse.
As a result you will see what DX reports - which class from your .JAR can't be converted to .dex file
Try this, an answer posted by User Declan Shanaghy:
Firstly close eclipse. Then open AndroidManifest.xml in a text editor. Delete the uses-sdk element then save and exit the editor. Fire up eclipse. It should build ok now. Now go to the manifest editor and enter the details you wish to have in the uses-sdk element.
Read more here in this link(Where I got the answer): Error launching first test application: Android Packaging Problem?
Hope I could be of help :D
Okay, I have no clue what was going on.... I tried a whole bunch of stuff, and made the "Conversion to dalvik format failed" error go away randomly, but java.lang.Object still could not be resolved because the AndroidManifest.XML was not synced. So I just made a new project in the workspace and copied all the text for each file, and it worked. But wait.... The original project works now, too!! What in the world!
精彩评论