"Android-tips" Unable to execute Dex:multiple Dex files define Workarounds

Source: Internet
Author: User

Well, I've thought about not moving Android in the future, but I didn't think it was the reason for the game. Many of the problems with Android are due to the imperfections of eclipse, such as the problem encountered today unable to execute Dex:multiple Dex files define

[ .-Ten- at  -: at: in - Dex Loader] unableTo execute Dex: multipledex Files Definelcom/MyApp/R$array;[ .-Ten- at  -: at: in -myProj] Conversion toDalvikformat failed: unableTo execute Dex: multipledex Files Definelcom/MyApp/R$array;

Well, the cause of the problem, everyone should encounter different problems, but all because of the eclipse compiler, you can refer to 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)

Here are my ideas and solutions:


Reason one: There is a problem with the APK compilation

WORKAROUND: Delete the bin file directly, eclipse will be automatically generated for you at compile time, if not, restart Eclipse


Reason two: Duplicate package name

WORKAROUND: There are two possible ways to duplicate a package name.

1, one is two jar name, in Lib can look at, if there is the same, delete a.

2. This is a situation that everyone should be aware of. Sometimes the jar name is different, but will also report this error, because the two jar inside the package name has the same. This requires us to open the jar and see if the package name is duplicated.

In the case of Android_services_2.2.0.jar and Android_location_v1.1.2.jar, the two do not have the same package.



Some thinking: In the process of doing, encountered a bug or oneself from the principle to understand the way, like I mentioned in the second above the situation, StackOverflow in fact also did not explain, some things still want to think more, do not blindly search the Internet to find the answer, especially in the operation of the egg hurt Android.


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

* This article from the blog "Bo Li Garvin"

* Reprint Please indicate the source : Http://blog.csdn.net/buptgshengod

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


"Android-tips" Unable to execute Dex:multiple Dex files define Workarounds

Related Article

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.