Solution of Android Studio error: Unable to start the daemon process

  • 2021-12-09 09:53:25
  • OfStack

Create a new project on Android Studio and Unable to start the daemon process. Error with the following error message:

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/3.3/userguide/gradle_daemon.html
Please read the following process output to find out more:
-----------------------

OpenJDK 64-Bit Server VM warning: ignoring option MaxPermSize=256m; support was removed in 8.0

Solution 1.

Method 1: Delete the C:\ Users\ UserName\. gradle directory and restart Android Studio. After rebooting, it will automatically create a new one for you.

Method 2: Modify the configuration. File- > Settings. Select the Compiler item in the left navigation bar and set VM Options to-Xmx512m.

Method 3: Others should try to set aside more memory space.

Solution 2.

Find a solution on stackoverflow:
Android Studio defaults to Gradle daemon process. The allocated heap size is too large (the default maximum heap size under windows platform is 75% of total physical memory up to 1 GB), so it is easy to cause the problem that there is not enough space to start. Make the space configuration slightly smaller by 1 point.
Enter in Android Studio

File- > Settings- > Compiler

Configure VM Options to a smaller value, such as-Xmx512m.

Restart Android Studio problem resolution.

Solution 3.

1. It may be due to the uninstallation or prohibition of daemon process by antivirus software. Therefore, restarting the computer can solve this problem.
2. Enter Chapter 6. The Gradle Daemon for configuration, which mainly tells us that under the path of C:\ Users\ Administrator\. gradle (where Administrator is your own user name), create a new gradle. properties file and write it into org. gradle. daemon=true

Add org. gradle. jvmargs=-Xmx512m


Related articles: