Solution for Android Studio 0.8.6 STORY: I recently back to developing some android application. Unfortunately Google as usual do lots of changes and decided to move admob library to Google play services and this forced me to use Android Studio with Gradle. It means ,I needed to migrate my IntelliJ IDEA to Android Studio,but this cause some problems. When you create build.gradle file and then Android Studio detect that and it tries convert project into Gradle project but it welcomed me with error :
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 Please read below process output to find out more: ----------------------- Error occurred during initialization of VM Could not reserve enough space for object heap Error: Could not create the Java Virtual Machine. Error: A fatal exception has occurred. Program will exit."If you see this error, Try these possible solutions.SOLUTION: If you see this depressing error:
If this doesn't help,then you need increase (or set ) maximum Java heap size. In other to do that you need :
- Remember to have enough free memory on your device.( I had problem if i didn't have 1GB of free memory)
- Run Android Studio as Administrator
- (optional) Run Android Studio as Administrator
- Go to File and press Settings (or use shortcut: Ctrl+Alt+S)
- Go to Compiler
- Find VM Options and put -Xmx512m.
- Press Apply
- Press OK
- restart IDE
It should works now.I hope, it helps .Good luck and have fun with development.
This blog is known for following posts: