Android Studio: failed to complete gradle execution, cause is empty

后端 未结 19 2008
佛祖请我去吃肉
佛祖请我去吃肉 2020-11-27 18:22

When I try to run an Android emulator, I get the following error screen. The same occurs when I export the apk. When I go to the directory where the apk will be saved, the a

相关标签:
19条回答
  • 2020-11-27 18:37

    I have this problem, too. I used Gradle v.1.3.1 but Android Studio version is v1.2.2. Just update Android Studio to v.1.3.2 solved my problem.

    0 讨论(0)
  • 2020-11-27 18:38

    I had a "Run" problem in Android Studio due to multiple instances of Android Studio were opened. So I closed all instances and opened only on instances for which I wanted to generate APK.And It worked well. May be it had a problem with RAM.

    0 讨论(0)
  • 2020-11-27 18:39

    When you have an error like this. Just move to your BOTTOM RIGHT corner of the screen there is something known as GRADLE CONSOLE open that and read what went wrong. That helped me.

    0 讨论(0)
  • 2020-11-27 18:41

    I accidentally deleted string from string.xml and I didn't know it was specified in manifest for activity name, so spent one hour to discovered that out

    0 讨论(0)
  • 2020-11-27 18:43

    I had the same issue, this problem will be fixed by doing the below step.

    Go to

    File->Setting->Gradle->Gradle Vm Option

    For Android Studio 1.2

    File->Setting->Build, Deployment &Execution->Build Tools->Gradle->Gradle Vm Option

    , Now put this value -Xmx256m in the box, and hit the Apply button.

    0 讨论(0)
  • 2020-11-27 18:43

    Try to upgrade your android studio, and when you run your project again, it will tell you where the problem is.

    For me, I encountered this problem several times, the first time is something wrong with the style.xml, and the second time is string.xml file. Anyway, It seems Android studio could not find something wrong with .xml file.

    But anyway, try to "refresh" your Android studio and let it tell you where are the problems, even reinstall it.

    good luck!

    0 讨论(0)
提交回复
热议问题