Android Studio: failed to execute gradle execution. Reason is empty

I tried installing another Gradle Vm Option from all the answers found in stackoverflow, but nothing seems to work. I'm on Android Studio 1.2.2 I get this error when I try to run the application either on the emulator or on the device.

Failed to complete gradle execution. Cause is empty

The only thing that works for me is that I need to set up a new project in different directories, but it only works for 3 instances, and then bang, this error appears. It is a tedious job to do the above process 10 times.

Edit_1: I even tried invalidating caches / reloads, not working

+7
android android-studio android-gradle
source share
6 answers

Reduce the rating to version 1.0.1 so that everything works flawlessly. I use the same project files, it works fine in this version n times, and the same project files give above an empty error in studio version 1.2.2

0
source share

Normally gradle assembleDebug works from the hand or from the gradle menu (the right side of the screen -> application -> Tasks -> assembly -> build Debug) gives much more information.

In my case, he found problems with resource files.

+11
source share

It happened to me, and the reason was different every time.

The first error in the XML file. I realized this by returning to the last stable fix. The error was the missing closing tag "/">. I don’t know why the android studio did not indicate this. This happened to several of my employees

The second time the patch added the line -Xmx256m or -Xmx512m

In: File-> Setting-> Build, Deployment & Execution-> Build Tools β†’ Gradle β†’ Gradle Vm Option

Hope this helps

+2
source share

This may be due to the fact that you specified some command-line option in the settings of Android studio. You can check this by selecting

File> Options> Build, Run, Deploy> Compiler

and see "Command Line Options" and check if anything is given. (In your case, -x). If you delete it and click "Apply" and "OK." It worked in my case ...

+1
source share

If you delete resources like layouts or lines or something else. Make sure everything is removed properly, each dependency is removed properly. Full cleaning. This solved the problem for me

0
source share

The reason is empty because the problem is in your xml or manifest resources

0
source share

All Articles