[Android-tips] Unable to execute dex: Multiple dex files define solution, android-tipsdex

Source: Internet
Author: User

[Android-tips] Unable to execute dex: Multiple dex files define solution, android-tipsdex

Well, I already thought about not moving android in the future. I didn't expect it to be a heavy job because of the competition. Android has many problems due to incomplete eclipse. For example, the problem encountered today is Unable to execute dex: Multiple dex files define.

[2011-10-23 16:23:29 - Dex Loader] Unable to execute dex: Multiple dex files define Lcom/myapp/R$array;[2011-10-23 16:23:29 - myProj] Conversion to Dalvik format failed: Unable to execute dex: Multiple dex files define Lcom/myapp/R$array;

Well, the cause of this problem, everyone should encounter different problems, but it is caused by the eclipse compiler, you can refer to the two articles (1. http://blog.csdn.net/asan855/article/details/7568702 2. http://stackoverflow.com/questions/7870265/unable-to-execute-dex-multiple-dex-files-define-lcom-myapp-rarray)

 

My ideas and solutions are as follows:


Cause 1: apk compilation problems

Solution: directly Delete the binfile. eclipse will automatically generate the binfile during compilation. If not, restart eclipse.


Cause 2: the package name is repeated.

Solution: there are two possibilities for duplicate package names.

1. The first is that the two jar files have the same name. In lib, you can check that if there is one, delete one.

2. You should pay attention to this situation. Sometimes the jar name is obviously different, but this error is also reported because the package names in the two jar files are the same. This requires that we open the jar to see if the package name is repeated.

For comparison, Android_Services_2.2.0.jar and Android_Location_V1.1.2.jar do not have the same package.



Some ideas: when developing a program, you still need to find a solution by understanding the principle of the bug. As mentioned in the second article above, stackoverflow does not actually explain it, you still need to think about some things and do not blindly search for answers on the Internet, especially when operating android.


/********************************

* This article is from the blog "Li bogarvin"

* Reprinted please indicate the source: http://blog.csdn.net/buptgshengod

**************************************** **/



In eclipse, the following occurs: Dex Loader] Unable to execute dex: Multiple dex files define LJDOMAbout $ Author;

Check whether your XML file is correct

[17:09:06-Dex Loader] Unable to execute dex: Multiple dex files define Lorg/ksoap2/se

Build Path-> Java Build Path-> Libraries: delete Android dependencies.
 

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.