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