Android Multi-dex packaging problem

Source: Internet
Author: User

Put Android-support-multidex.jar under Libs and compile with the following error:

Error:Executionfor‘:app:packageAllDebugClassesForMultiDex‘.> java.util.zip.ZipException:entry: android/support/multidex/MultiDex.class

The reason is that many of the same packages have been introduced, but there is only one package under Libs, and after a variety of attempts, the final solution is as follows:
1. Upgrade the support of the SDK for this computer to the latest version:

If it is not possible to download it for network reasons, it can be downloaded from here, and then put the downloaded jar into the ~\extras\android\support\multidex\library\libs directory under the Local SDK directory;
2. In the dependencies of the Gradle script compile ‘com.android.support:multidex:1.0.0‘ and remove the Multidex package from the Libs directory of the project, Gradle will automatically go to the SDK directory below (note that it is not repositories download, There is no such package in repositories, so we need to do the first step);
3. Compile again to work properly.

Android Multi-dex packaging problem

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.