0

Android Studio was working fine until I updated its version from 3.1.4 to 3.5.2 I tried to open my project but The following error appears in gradle sync:

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 https://docs.gradle.org/4.4/userguide/gradle_daemon.html
Please read the following process output to find out more:
-----------------------
Error occurred during initialization of VM
Could not reserve enough space for 1572864KB object heap

I tried to delete .gradle folder in C:\Users\<user-name> but the problem persists How could I solve this problem? below is a screenshot of the error: Android Studio output

gradle.properties file content:

# Project-wide Gradle settings.
# IDE (e.g. Android Studio) users:
# Gradle settings configured through the IDE *will override*
# any settings specified in this file.
# For more details on how to configure your build environment visit
# http://www.gradle.org/docs/current/userguide/build_environment.html
# Specifies the JVM arguments used for the daemon process.
# The setting is particularly useful for tweaking memory settings.
org.gradle.jvmargs=-Xmx1536m
# When configured, Gradle will run in incubating parallel mode.
# This option should only be used with decoupled projects. More details, visit
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
# org.gradle.parallel=true
Ahmad
  • 397
  • 2
  • 7
  • 18
  • Post content of your `gradle.properties` file – solidogen Nov 24 '19 at 21:15
  • content posted @Solidogen – Ahmad Nov 24 '19 at 21:18
  • Check your hard disk and RAM, maybe there is not enough resources to open JVM. You can also try to set it to lower value like `-Xmx512m` and see what happens. – solidogen Nov 24 '19 at 21:23
  • I also think that the overall free RAM is below 1536 MB, therefore that amount cannot be allocated to the JVM. Check the resource monitor - and if this should be the case, just add a pair of DIMM modules. 1536 MB is even the default setting (occasionally it might demand some more of it). Sysinternals [RAMMap](https://learn.microsoft.com/en-us/sysinternals/downloads/rammap) and [VMMap](https://learn.microsoft.com/en-us/sysinternals/downloads/vmmap) display the memory utilization in detail. – Martin Zeitler Nov 24 '19 at 22:42
  • @MartinZeitler I was running smoothly without any problem just before I updated android studio.. I have 16 GB of RAM, more than half of it are free – Ahmad Nov 25 '19 at 19:06

0 Answers0