Android Studio Keep say Failed to execute Gradle execution

All right with the command line

gradle build 

But Android Studio keeps saying that

 Failed to complete Gradle execution Cause: A fatal exeption has occurred. Program will exit 

If I cleared the entire cache and restart everything will be fine, but this dialog will be easy to return again (after the build failed). I assume that the chain of constructing the increment is not very good, but the message is generally not useful.

Are there any things I can do to get a more verbose message of what is happening, why the AndroidStudio Gradle failed? where can i put things like --stacktrace in android studio settings?

+8
android gradle
source share
3 answers

If you have such a problem in the Android studio, then do not worry about it, you are missing some things that are here.

Go to File → Settings → Gradle → Gradle Vm Option . Now put this value -Xmx256m in the box and click "Apply."

Here you have solved the problem.

+23
source share

In my case, I forgot to include some bans in the Libs folder in the Gradle file, in fact I forgot to add ".jar" to the end of the jar file name.

+1
source share

In my case, it was not a variant of VM, and Clean and Build did not work. My problem was that some images were detected in the res folder (so no grammatical errors) and Android Studio / IntelliJ did not return this error and did not say anything about images ... check all external strong> data sources in each file.

+1
source share

All Articles