BUG Error: Execution failed for task & #39;: app: dexDebug & #39;., executiondexdebug

Source: Internet
Author: User

BUG Error: Execution failed for task': app: dexdebug'., executiondexdebug

Error:Execution failed for task ':app:dexDebug'.

> Com. android. ide. common. process. processException: org. gradle. process. internal. execException: Process 'COMMAND 'C: \ Program Files \ Java \ jdk1.8.0 _ 66 \ bin \ java.exe ''finished with non-zero exit value 2

 

I want to get a google Map and then use android studio to generate this project. However, the above error occurs during running.

 

I found some information.

Http://stackoverflow.com/questions/28917696/errorexecution-failed-for-task-appdexdebug-com-android-ide-common-process

The reasons are as follows:

It seems you have a jar file or a lib appearing multiple times.

So, remove the. jar file from the lib folder then:

Build>Rebuild

The translation is probably:

That is to say, the jar or lib file appears multiple times.

So you can remove the corresponding. jar file from lib. Then rebuild

 

BUT !! This is the most amazing thing in life.

As a beginner, I don't know what it is called. jar, but I don't know where it is.

Fortunately, I have another solution.

I had the same problem error that is shown, I solve it by adding

defaultConfig {            // Enabling multidex support.    multiDexEnabled true}

I had this problem cause I exceeded the 65 K methods dex limit imposed by Android I used so far libraries

In Gradle Scripts

In the build. gradle (Module: app) file,

 

FindDefaultConfig,Add

MultiDexEnabled true


That is, the following.
defaultConfig {
MultiDexEnabled true

}


Then I found out what the role of multiDexEnabled is.
Then,
The cause of the above problem.
The number of Dex file methods in the application exceeds the upper limit of 65536. In short, the application burst.

For more information, see the following blog link. I will not read it as a beginner. Mainly because of laziness
Time sand: http://blog.csdn.net/t12x3456 (from time sand csdn blog)
http://blog.csdn.net/t12x3456/article/details/40837287

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.