Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

An error when creating new project in android studio

Tags:

Every time I create new project i get this error:

Failed to import new Gradle project: Could not fetch model of type 'IdeaProject' using Gradle distribution 'http://services.gradle.org/distributions/gradle-1.6-bin.zip'. 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.6/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.   Consult IDE log for more details (Help | Show Log) 

Any Idea?

like image 432
Ali Avatar asked May 23 '13 11:05

Ali


People also ask

How do you create a new project in Android Studio?

If you don't have a project opened, Android Studio shows the Welcome screen, where you can create a new project by clicking Start a new Android Studio project. If you do have a project opened, create a new project by selecting File > New > New Project from the main menu.

Why is Android Studio not working?

If Studio doesn't start after an upgrade, the problem may be due to an invalid Android Studio configuration imported from a previous version of Android Studio or an incompatible plugin.


1 Answers

Start Android Studio, close any open project.

On the right side, click on Configure -> Settings.

On the left side, in Compiler->Gradle set VM Options to "-Xmx512m" (without quotes)

Press OK, then create a project. Worked for me.

like image 145
Sambulo Senda Avatar answered Dec 14 '22 20:12

Sambulo Senda