ImP ImP - 22 days ago 10
Android Question

Android studio: build project error - Failed to complete Gradle execution

I'm newbie with android studio.
I'm trying to build project in android studio (make project) and it show me this:


Failed to complete Gradle execution.

Cause: Unable to start the daemon process. This problem might be
caused by incorrect configuration of the daemon. For example, an
unrecognized jvm option is used. Please refer to the user guide
chapter on the daemon at
http://gradle.org/docs/2.2.1/userguide/gradle_daemon.html Please read
the following process output to find out more:
----------------------- 12:21:07.481 [main] DEBUG o.g.l.daemon.bootstrap.DaemonMain - Assuming the daemon was started
with following jvm opts: [-XX:MaxPermSize=256m,
-XX:+HeapDumpOnOutOfMemoryError, -XX:MaxPermSize=512, -Xmx512m, -Dfile.encoding=windows-1258, -Duser.country=US, -Duser.language=en, -Duser.variant]

FAILURE: Build failed with an exception.


  • What went wrong: Could not create service of type DaemonContext using DaemonServices.createDaemonContext().

  • Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.




Can anyone help me please!

Answer

Solutions

1) find the location of of your .gradle folder, in Android Studio goto File->Settings and type "gradle" in the search box. You will be able to pick up the correct path there

2)Remove the .gradle directory (mine's location was C:\Users\UserName.gradle), and restart android studio. It will automatically create a new one.

Comments