Android: Conversion to Dalvik format failed: Unable to execute dex: null

后端 未结 14 1656
借酒劲吻你
借酒劲吻你 2020-12-28 13:11

I\'m trying to use the SmugFig SmugMug API on Android. It was designed for J2SE I would imagine, so I\'m not sure it will even work on Android, but I figured it was worth t

相关标签:
14条回答
  • 2020-12-28 13:47

    its simply because of the Heap size occupied by some JAR files...which can be removed manually...

    else the best option is to modify the Eclipse.ini file in the eclipse folder.....

    add -Xmx1024m to the file to make the memory size to 1 GB ...it woul work for sure.....

    0 讨论(0)
  • 2020-12-28 13:49

    Here they suggest that these error is caused by huge .java files.

    I had the same problem and incrementing the memory allocated works for me.

    0 讨论(0)
  • 2020-12-28 13:52

    Go to Project » Properties » Java Build Path » Libraries and remove all except the "Android X.Y" (in my case Android 1.5). click OK. Go to Project » Clean » Clean projects selected below » select your project and click OK. That should work.

    It is also possible that you have a JAR file located somewhere in your project folders (I had copied the Admob JAR file into my src folder) and THEN added it as a Java Path Library. It does not show up under the Package Explorer, so you don't notice it, but it does get counted twice, causing the dreaded Dalvik error 1.

    Another possible reason could be package name conflicts. Suppose you have a package com.abc.xyz and a class named A.java inside this package, and another library project (which is added to the dependency of this project) which contains the same com.abc.xyz.A.java, then you will be getting the exact same error. This means, you have multiple references to the same file A.java and can't properly build it.

    0 讨论(0)
  • 2020-12-28 13:53

    I helper to remove /home/user/.android folder. OS: Debian Wheezy 32bit

    0 讨论(0)
  • 2020-12-28 13:55

    I found a blog entry that says increase the memory allocated in eclipse.ini to this: -Xms128m -Xmx512m or something higher, but this didn't do it for me.

    However, I found another post that suggested doing Project > Clean and that fixed it for me. I think it happens when you shut down Eclipse w/o shutting the emulator down first. Pretty lame bug. Spent a few hours digging for the solution this morning...grrrrrrr :-(

    0 讨论(0)
  • 2020-12-28 13:55

    http://groups.google.com/group/android-developers/browse_thread/thread/3911749addce534d

    They are working on pushing a fix now for 2.3

    Edit: This has been fixed for 2.3 , go get the update via eclipse.

    0 讨论(0)
提交回复
热议问题