Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Android Build a Simple Android App (2014) Getting Started with Android Creating the Fun Facts Project

How do I fix this error in Android Studio?

As was shown in the video, I created my first new project in Android Studio and selected a template for the first activity. After pressing the "finish" button to finish creating the new project, I got the following 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. */

Extra info and I am not sure this is related: I have a 64 bit machine. When I downloaded the 64 bit Java and created the proper environment variable, I received an error upon opening Android Studio which stated that I needed to download the 32 bit version. (The error stated the problem could also be due to not creating an environment variable, but I had already done that, so downloading the 32 bit version was the only remaining action I could take to alleviate the problem) I downloaded the 32 bit version, and I am now able to open Android Studio, but still get the error above.

Thanks for any help!!!

9 Answers

Ben Jakuben
STAFF
Ben Jakuben
Treehouse Teacher

When you open Android Studio, which executable did you use? There are 32 bit and 64 bit versions in there, but I didn't make that clear in my video.

Ben Jakuben
STAFF
Ben Jakuben
Treehouse Teacher

I haven't seen this error, but a quick search found this possible solution on StackOverflow.

Thanks. Any idea how to access the gradle.properties file?

I found it. When I click on it, I get the error "Gradle project sync failed. Basic functionality (e.gm. editing debugging) will not work properly."

Ben Jakuben I just started Android Studio and I got this "Gradle Sync Failed" error, I fixed it. I uninstalled Android Studio, deleted all the files that might have been on my PC, everything including the project files in my documents. Then I re installed Android Studio and realized it started downloading few gradle files on its own.

Gradle Synch Failed error arises if you install and run the Android Studio totally offline, when you first install you have to make sure you are connected to the internet. That is what I think should be a step in installing Android Studio and should keep off the error.

Ben Jakuben
Ben Jakuben
Treehouse Teacher

Thanks for sharing! I'll see if I can recreate it.

Ben Jakuben I think installing the AndStu while i was offline invoked the error in the first place. I dont want to dare recreate the error.

Were you able to fix the error? I cannot start start my project because of the GRADLE PROJECT SYNC FAIL. I tried many fixes recommended on stackoverflow, it just wont work. Help

Ben Jakuben
Ben Jakuben
Treehouse Teacher

Can you paste your specific error in a new Forum thread? Hopefully we can get you up and running!

brian summers
brian summers
3,209 Points

My mistake, and I had to read the transcript, is make sure your environment variable for java is JAVA_HOME and not JAVA HOME

TRY THIS :::: File -> Settings -> Compiler Change the "VM options" to -Xmx512m -XX:MaxPermSize=512m

Kody Kendall
Kody Kendall
2,473 Points

Did anyone else solve this problem?

I'm having the exact same error message when I first open Android Studio.

I've changed the compiler to 1024 m, and changed the VM options to -Xmx512m.

Still doesn't work.