Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android Studio Gradle project "Unable to start the daemon process /initialization of VM"

Version of Android Studio (Beta) 0.8.4
OS version: Windows 8
Java JRE/JDK version: 1.8.0_11

Error: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/1.12/userguide/gradle_daemon.html ----------------------- Error occurred during initialization of VM Could not reserve enough space for 1048576KB object heap Java HotSpot(TM) Client VM warning: ignoring option MaxPermSize=256m; support was removed in 8.0 
like image 562
AsimRazaKhan Avatar asked Jul 29 '14 06:07

AsimRazaKhan


People also ask

What is gradle daemon in Android Studio?

The Gradle Daemon keeps the Gradle Framework initialized and running, and caches project data in memory to improve performance. For a Single Build. To enable the Daemon for a single build, you can simply pass the --daemon argument to your gradle command or Gradle Wrapper script.

What is daemon in Android Studio?

A daemon is a computer program that runs as a background process, rather than being under the direct control of an interactive user. — Wikipedia. Gradle runs on the Java Virtual Machine (JVM) and uses several supporting libraries that require a non-trivial initialization time.

How long does it take to start a Gradle daemon?

For your first app, running it on the emulator takes a considerably long period of time. I've a decently fast machine and it took around 20-22 minutes to launch the app on the emulator.


Video Answer


2 Answers

The Solution Worked:

    1.Open the projects gradle.properties file in android studio
    2.Added this line at end of file org.gradle.jvmargs=-Xmx1024m & Save the file
    3.Close & reopen the project
like image 183
Shriram Panchal Avatar answered Oct 26 '22 17:10

Shriram Panchal


Do Following steps:

  1. Start Android Studio.
  2. Close any open project.Go to File > Close Project.(Welcome window will open)
  3. Go to Configure > Settings.
  4. On Settings dialog,select Compiler (Gradle-based Android Projects) from left and set VM Options to -Xmx512m(i.e. write -Xmx512m under VM Options:) and press OK.

Where to put it

like image 42
Giru Bhai Avatar answered Oct 26 '22 17:10

Giru Bhai