Android Error in Eclipse: “Unable to execute dex: Cannot merge new index 65799 into a non-jumbo instruction!”

荒凉一梦 提交于 2019-11-27 11:53:26

One solution that I found that got it working for me was to add dex.force.jumbo=true to my project.properties.

This was pointed out at: https://groups.google.com/forum/?fromgroups=#!topic/adt-dev/tuLXN9GkVas

This is assuming you are running ADT 21 as this feature wasn't available in previous versions.

The same problem...just put

dex.force.jumbo=true

in the first line of project.properties

If using gradle build, just add the dexOptions into build.gradle to enable jumbo mode:

android {
    dexOptions {
        jumboMode = true
    }
}

Remember to run "gradle clean" before your new building.

I had the same problem, but my IDE was IntelliJ IDEA 13. In that version, the dex.force.jumbo instruction in the project.properties file is ignored.

To enable it, just go to Settings | Compiler | Android DX and select the Force jumbo mode option.

Hope it helps (this is the only SO-related question I have been able to find).

mobileasumma

Just adding jumboMode=true didn't work for my gradle build. However this worked (quoted from Xavier in the adt-dev group as a reply to a bug filed in this area):

"Try to delete all the build folders manually and build again, making sure the dexOptions.jumboMode is set to true in the project?

There's an issue where the root project's build is not deleted in the clean task and this contains some information about the pre-dexed libraries."

Adding some explanation:

This happens when Eclipse tries to incrementally build, when a change increases the number of string constants in the application. The original dex had non-jumbo instructions, and the new dex that's being merged into it has jumbo instructions. Doing a clean will show that it works when you build from scratch.

As long as the number of strings in your application is monotonically increasing, incremental builds will work going forward.

I had the same problem, but in my case the "dex.force.jumbo=true" command doesn't solve the problem. I try to update JDK and JRE , and that solve the problem.

Hope this answer help

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!