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