Search code examples
androidandroid-studiojava-home

Why "Failed to load JVM DLL"?


I updated android studio from Dolphin to Electric Eel and now it won't start, giving the following error message:

Failed to load JVM DLL C:\Program Files\Android\Android Studio\jbr\\bin\server\jvm.dll
If you already have a JDK installed, define a JAVA_HOME variable in Computer > System Properties > System Settings > Environment Variables.

I already have JAVA_HOME set but tried different paths, different java versions, uninstalling, installing, etc. Tried deleting all the caches I could find (probably missing something). Tried uninstalling android studio multiple times, or going back to the older version and updating again. While on the older version - tried to change the JDK that the studio was using and then update. Nothing of the above works.


Solution

  • Edit:
    There's a workaround mentioned here. It worked for me.
    It says to install Microsoft Visual C++ Redistributable
    Installing it provides a "missing vcruntime140_1.dll file in bundled Java Runtime" to the Android Studio.

    Old answer:
    I "solved" it by deleting the jvm.dll file in C:\Program Files\Android\Android Studio\jbr\bin\server. Then it started actually looking up the JAVA_HOME variable and the studio launched.