Unable to execute DEX: Multiple Dex files define Solution

Source: Internet
Author: User

Problem Overview:
The program is compiled normally. When you use eclipse for debugging and execution, the following error occurs: unable to execute DEX: Multiple Dex files define. Because this type of error has not been encountered before, you should first try to make a universal error, the following method 1 is also one of the solutions for online search. If the solution fails after the attempt, the system tries one by one based on the search solution and fails to solve the problem. Finally, the system suddenly finds the problem in the project. The specific solution is as follows: Method 1:
Eclipse-> Project-> remove build automatically-> clear-> build project-> build automatically, close eclipse, and then open (this is not my problem)
Method 2: 
Update the ADT plug-in and delete. metadata directory (this solution was not tried, because during the development process, I only changed a jar package and the error occurred, and the development environment cannot connect to the network, which is not convenient to try)
Method 3:
In a folder under your project, there is a file with the suffix *. APK. Delete it and restart eclipse. (Failed)
Method 4:
The reason is that there are duplicates. Jar is referenced. You can view your build path. In particular, Android dependencies must have repeatedly introduced. Jar packages. The solution is to delete duplicate jar files in libs. (I have been looking for a long time, I have not found repeated reference of the jar package, but I still have to thank this classmate, I finally can solve the problem is also inspired by this solution, paste blog connection http://blog.sina.com.cn/s/blog_4b9b6ad001016uuk.html)
Method 5: (successful solution)
In the project, the package name of a class is the same as the class in the referenced jar package. I use the class in the jar package, so this class in the project is referenced repeatedly, after you delete a class that is referenced repeatedly in the project, it is packaged and started. I hope you will pay attention to this small problem.

Reference: http://blog.csdn.net/mxlxiao7/article/details/8978930

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.