0
votes

Android Studio 4.1.2 unable to run android studio on emulator or real device This happen only when open java project but it did not happen when run flutter project.

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 Manual chapter on the daemon at https://docs.gradle.org/6.5/userguide/gradle_daemon.html Process command line: C:\Program Files\Android\Android Studio\jre\bin\java.exe -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Xmx2048m -Dfile.encoding=UTF-8 -Duser.country=US -Duser.language=en -Duser.variant -cp C:\Users\HP.gradle\wrapper\dists\gradle-5.6.4-all\ankdp27end7byghfw1q2sw75f\gradle-5.6.4\wrapper\dists\gradle-6.5-all\2oz4ud9k3tuxjg84bbf55q0tn\gradle-6.5\lib\gradle-launcher-6.5.jar org.gradle.launcher.daemon.bootstrap.GradleDaemon 6.5 Please read the following process output to find out more:

Error occurred during initialization of VM Unable to allocate 65536KB bitmaps for parallel garbage collection for the requested 2097152KB heap. Error: Could not create the Java Virtual Machine. Error: A fatal exception has occurred. Program will exit. OpenJDK 64-Bit Server VM warning: ignoring option MaxPermSize=512m; support was removed in 8.0


Check the JVM arguments defined for the gradle process in:

  • gradle.properties in project root directory

how to solve this issue.

1

1 Answers

0
votes

I found the solution

go to gradle.properties file and add change the value of this line to org.gradle.jvmargs=-Xmx1024m