4

I am stuck with the Importing of the Eclipse Project in Android Studio. I tried to import it but gradle.properties file is missing. So when I sync project it says the following error.

Error:Unable to start the daemon process: could not reserve enough space for object heap. Please assign more memory to Gradle in the project's gradle.properties file. For example, the following line, in the gradle.properties file, sets the maximum Java heap size to 1,024 MB: org.gradle.jvmargs=-Xmx1024m Read Gradle's configuration guide
Read about Java's heap size

So I dont even have the gradle.properties file then How can I add this line in that.

org.gradle.jvmargs=-Xmx1024m
Chandan kushwaha
  • 941
  • 6
  • 26

2 Answers2

2

This question is answered here:

Just create a file called gradle.properties in your root project:

root
|--gradle.properties
|--build.gradle
|--settings.gradle
|--app
|----build.gradle

Then add inside the file:

org.gradle.jvmargs=-Xmx2048m
Community
  • 1
  • 1
Paco Abato
  • 3,920
  • 4
  • 31
  • 54
0

You have to put gradle.properties file into your Eclipse project folder. You can copy gradle.properties file from your existing Android Studio project. After putting gradle.properties file click into "Sync Project with gradle file". It will solve this issue.

If you still face this issue, write this line, at the end of gradle.properties file:

org.gradle.jvmargs=-XX\:MaxHeapSize\=256m -Xmx256m
Tunaki
  • 132,869
  • 46
  • 340
  • 423