skip to Main Content

Android Studio Electric Eel – The supplied javaHome seems invalid. I cannot find the Java executable. Tried location: C:Program FilesAndroidAndroid Studiojrebinjava.exe

The error occurs after upgrading my Android Studio to Electric Eel, the latest version. I tried multiple solutions to this problem, but nothing worked.
My JAVA_HOME and ANDROID_HOME variables are set. I even tried to reinstall Java JDK-19 and reinstalled the Android Studio, but I still have the same issue.

I even tried to reinstall Java JDK-19 and reinstalled Android Studio, but I still have the same issue.

6

Answers


  1. Chosen as BEST ANSWER

    SOLVED:

    For Windows

    Go To the android studio directory

    (Default C:Program FilesAndroidAndroid Studio)

    remove jre folder

    run cmd as administrator

    cd C:Program FilesAndroidAndroid Studio
    mklink /D "jre" "jbr"
    

  2. THANKS a LOT. You solve my problem. Only to note that you have to remove all the folders inside C:Program FilesAndroidAndroid Studiojre by hand

    -1. run cmd as administrator

    1. cd "C:Program FilesAndroidAndroid Studio"
    2. remove first files from all subfolders of jre > del /s .jre
    3. remove jre folder > rmdir /s .jre
    4. make link to jbr folder containing binjava.exe named as jre > mklink /D "jre" "jbr"

    Thanks

    Login or Signup to reply.
  3. These two steps were enough for me:

    1. Set JAVA_HOME to …AndroidAndroidStudiojbr
    2. Rename or delete …AndroidAndroidStudiojar
    Login or Signup to reply.
  4. This is an issue with gradle cache mecanism.

    You need to locate .gradle/daemon/<version>/registry.bin file and delete it.

    Note: you can delete all the daemon sub-folders.

    You can now compile your project with your JAHA_HOME environment variable as Gradle will regenerate those.

    Login or Signup to reply.
    1. Delete the folder: C:Program FilesAndroidAndroid Studiojre

    2. Restart Android Studio

    It solves the issue!

    Login or Signup to reply.
  5. Accepted question will break future Android Studio patch.
    Solution for this question is so simple, just delete folder .gradle in your %USER_HOME% (C:/Users/your_user).
    Make sure you close Android Studio and all Java.exe process before delete .gradle folder.

    Edit:
    Upgrade to Flutter 3.7.6 and this bug will be solved.
    It can be checked here:
    https://github.com/flutter/flutter/wiki/Hotfixes-to-the-Stable-Channel

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search