skip to Main Content

I have updated my Android Studio Version Dolphin to Electric Eel. Now i am getting error in flutter doctor that unable to find bundle java version. I tried and configure jdk in Android Studio Native and able to run application successfully but if i open flutter project it gives me below error

FAILURE: Build failed with an exception.

* What went wrong:
  Execution failed for task ':app:packageQaDebug'.

> `A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade`
> `com.android.ide.common.signing.KeytoolException: Failed to read key AndroidDebugKey from store "/home/vasudev1/.android/debug.keystore": Invalid keystore format`

run flutter doctor i got below log

    [✓] Flutter (Channel unknown, 3.0.4, on NJOS7-ver-3.8 5.12.4-051204-generic,
        locale en_IN)
        • Flutter version 3.0.4 at 
         /home/user/Development/flutter/flutter_2_0_6
        • Upstream repository unknown
        • Framework revision 85684f9300 (7 months ago), 2022-06-30 
         13:22:47 -0700
        • Engine revision 6ba2af10bb
        • Dart version 2.17.5
        • DevTools version 2.12.2



       [✓] Android toolchain - develop for Android devices (Android SDK 
          version 33.0.0)
        • Android SDK at /home/user/Android/Sdk
        • Platform android-33, build-tools 33.0.0
        • Java binary at: /usr/bin/java
        • Java version OpenJDK Runtime Environment (build1.8.0_282-8u282- 
         b08-0ubuntu1~20.04-b08)
        • All Android licenses accepted.


    [!] Android Studio (version 2022.1)
        • Android Studio at /home/user/Development/android-studio
        • Flutter plugin version 71.2.4
        • Dart plugin version 221.6091
        ✗ Unable to find bundled Java version.
        • Try updating or re-installing Android Studio.
        `! Doctor found issues in 2 categories`.

How do i fix this issue?

6

Answers


  1. macOS

    This stackoverflow article helped me.

    As I got an Operation not permitted error message while creating ln -s ../jbr jre, i just copied the jbr folder and renamed it to jre.

    This fixed my Unable to find bundled Java version. error in flutter doctor.

    Login or Signup to reply.
  2. for Android Studio Electric Eel
    On Mac M1

    1. Open "Applications" in Finder.
      Then right click on Android Studio, select "Show Package Contents".
    2. Inside it, open the "Contents" folder.
      Inside it you will see folder with named "jbr".
    3. Simply copy the "jbr" and paste it on same folder.
    4. Rename the "jbr copy" to "jre".
    5. Then, flutter doctor -v. The "Unable to find bundled Java version" warning will disappear.
    6. Your android and flutter working, enjoy 🙂enter image description hereenter image description hereenter image description hereenter image description hereenter image description here
    Login or Signup to reply.
  3. Just open/create any native android project in android studio. It will automatically give you the JDK 11 setup prompt. Just install/configure that and you are done with all other flutter projects.

    Login or Signup to reply.
  4. I tried everything. Also tried deleting .android folder it did not work Looks like this error appears with new version of Android studio. Only way to fix this downgrading Android studio version. This is the link All Android Studio releases Best way to fix this uninstall the Android Studio and download the previous version of your Android Studio. If you do not remember version of your Android studio go to your download folder and find installation file. If you deleted it you can find it browser history. Hope it helps

    Login or Signup to reply.
  5. I found another post and followed directions found there. For Linux, all I did was cd to my android-studio folder and type in: ln -s jbr jre

    Unable to find bundled Java version on Flutter

    Login or Signup to reply.
  6. macOS

    The issue I believe is the folder for jre was renamed to jbr in Electric Eel

    Open terminal and run the following

    1. cd /Applications/Android Studio.app/Contents/
    2. ln -s jbr jre

    Should create simulink for anything looking for the jre folder

    Linux

    Same idea:

    1. Navigate to android studio folder
    2. run ln -s jbr jre
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search