whenever I run an application of build gradle, android studio opens multiple instances of openjdk binary plaform.
-
I have turned off hotspot. And went further to turning on airplane mode
-
I have started android studio as administrator
-
I have done this:
useorg.gradle.jvmargs=-Xms512m -Dfile.encoding=UTF-8
in the gradle.properties instead oforg.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8
This is really annoying.
I use:
Android studio 4.1.2
Gradle build:
**
Executing tasks: [:app:assembleDebug] in project C:
UsersHeavenlyAndroidStudioProjectsPhotoGalleryX
Starting Gradle Daemon…
Gradle Daemon started in 4 s 63 ms
Starting Gradle Daemon…
Gradle Daemon started in 3 s 688 ms
Starting Gradle Daemon…
Gradle Daemon started in 3 s 550 ms
Starting Gradle Daemon…
Gradle Daemon started in 3 s 639 ms
Starting Gradle Daemon…
Gradle Daemon started in 3 s 766 ms
Starting Gradle Daemon…
Gradle Daemon started in 3 s 945 ms
Starting Gradle Daemon…
Gradle Daemon started in 3 s 986 ms
Starting Gradle Daemon…
Gradle Daemon started in 3 s 840 ms
Starting Gradle Daemon…
Gradle Daemon started in 3 s 890 ms
Starting Gradle Daemon…
Gradle Daemon started in 4 s 58 ms
Starting Gradle Daemon…
Gradle Daemon started in 3 s 966 ms
Starting Gradle Daemon…
Gradle Daemon started in 4 s 126 ms
Starting Gradle Daemon…
Gradle Daemon started in 4 s 379 ms
Starting Gradle Daemon…
Gradle Daemon started in 4 s 511 ms
Starting Gradle Daemon…
**
2
Answers
Basically, you cannot do anything about it. It’s just how it’s made and how it works. As mentioned by @dan1st, Gradle daemon runs on first JVM, compilation needs another and so the android tools. However, it’s a different case scenario if more than 4-5 JVMs are running. If that is the issue, try switching off the mobile hotspot in windows, because the gradle server doesn’t accept connection from a daemon while hotspot is running. Add
-Xmx3G
to your gradle.properties also. Post the error log from%UserProfile%.gradledaemondaemon-version for android-studio
.You can try setting this properry
as described at https://docs.gradle.org/current/userguide/build_environment.html#sec:gradle_configuration_properties