Multiple Duplicate Openjdk binaries on start of android studios/ gradle sync failed, 96% RAM

Viewed 887

System specifications: 16 GB RAM, GTX 1050 8GB, i7 8th gen, HP OMEN 17T(2018), Win 10. On opening android studios(Fresh download), multiple(80+) OpenJDK platform binary files(consume 100MB each) are opened during Gradle build(binaries can be seen running on task manager in the given image). These files take 97% of my system RAM, following which android studio crashes due to failed Gradle sync/unable to start Gradle daemon(unable to allocate memory for object heap). These rogue OpenJDK files do not close even after I terminate android studios and continue consuming RAM. Uninstalling and reinstalling android studios do not seem to help.

my normal RAM consumption is 20-27% and all other system processes run fine, I have McAfee antivirus on at all times.

task manager at android studio runtime

3 Answers

I can't believe that this exact issue I've been facing for days was simply fixed by switching off the Hotspot in my windows 10

Don't ask me why or how I don't know,, it just fixed it,, in my case

Downgrading gradle worked for me! just open project structure in Android Studio and choose gradle version as 6.0 and plugin version as 3.6.4.

The problem was with Gradle itself, seems like a bug(as @Zoe mentioned in the comments). A temporary solution is to start Gradle in offline mode. You can let it connect to the internet once the Gradle build is complete(Gradle daemon started successfully).

I tried adding other unrelated java files in the bin folder and found those binaries to be duplicated in my task manager along with OpenJDK, hope the Studio dev team fixes this soon.

Related