[Android development FAQ-11] unable to execute DEX: Multiple Dex files define Solution

Source: Internet
Author: User

Recently, an open-source Library Project Android-viewpagerindicator was used in the development of a project.

This project appears as a library, for example:

This project contains the android-support-v4.jar

The library is referenced in another project, for example:

Then compile the project, and the error described in the title is repeated.

Since the project itself does not have the android-support-v4.jar package, but after adding the first project as a library file, this android-support-v4.jar appears in the project.

Solution:

1. First, the project references the first project as the library to cancel, that is, remove the entry and refresh the project.

2. Set the first library project as follows, and ensure that the ADT version is high enough:

This is mainly to remove the android private libraries option, so that other projects that reference this project will not add the pirvate libraries of this project to their own dependencies.

3. re-set your project to depend on this library project, compile, pass, and run it. OK

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.