Com.android.dex.DexIndexOverflowException merging dependencies or error that Java.exe finished with Non-zero exit value 2

Source: Internet
Author: User

This problem has troubled me for two days, now solve the problem of this trouble, I think it is necessary to blog the form of my sad experience, in the online search for a lot of information about this, most of them are said to compile the jar package, or libs repetition of the same (I use as), But I looked carefully several times my builde.gradle file, no this problem exists, so I was very puzzled, a few toss, I think or from the wrong log to find the source of the bug, found Java.exe finished with Non-zero exit The value 2 was also caused by the com.android.dex.DexIndexOverflowException error, so I found the answer on the Overflowstack Web (http://stackoverflow.com/ Questions/33590477/unexpected-top-level-exception-com-android-dex-dexindexoverflowexception-mergin), different Version of the same library and May is unnecessary dependencies (there are different versions of the class library and no necessary dependencies), which will cause such errors, Since the Gradle plugin 0.14 .0 and the Build Tools 21.1.0 you can use the multidexsupport. To resolve this issue, add compile ' com.android.support in the defaultconfig in your builde.gradle file multidexenabled true,dependencies: multidex:1.0.0 ', so that miracles happen.

Com.android.dex.DexIndexOverflowException merging dependencies or error that Java.exe finished with Non-zero exit value 2

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.