Problem
After upgrading my Android Studio, due I wanted to finish some unfinished Flutter projects of mine, to below version, I ran into an issue after running “Flutter Doctor” in my PowerShell.
Android Studio Giraffe | 2022.3.1 Patch 4
Build #AI-223.8836.35.2231.11090377, built on November 14, 2023
Runtime version: 17.0.6+0-b2043.56-10027231 amd64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
Windows 11 10.0
GC: G1 Young Generation, G1 Old Generation
Memory: 1280M
Cores: 8
Registry:
external.system.auto.import.disabled=true
ide.text.editor.with.preview.show.floating.toolbar=false
Non-Bundled Plugins:
Dart (223.8977)
io.flutter (76.3.2)
NOTE: Please see my other article if you also received "linkageError" after running the command "flutter doctor --android-licenses"
IMPORTANT: removed all other output with exception for the topic!
PS C:\src\flutter> flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
...
...
[!] Android Studio (version 2022.1)
X Unable to find bundled Java version.
[!] Android Studio (version 2022.3)
X Unable to find bundled Java version.
...
...
! Doctor found issues in 5 categories.
Solution
Fix “Unable to find bundled Java version”
I was a bit confused about this error, because I have Java installed and it worked perfectly fine with the previous Android Studio. Something wrong with the Java Runtime?
Anyway sometimes you are lazy and that day I did not feel like troubleshooting much, to only give myself a pat on the shoulder if I got it fixed…lol.
I called upon my good friend on the internet…and there were several solutions for fixing this (so many minds on the internet, also comes with sheeps/lemmings? and wannabees, yeah I belong to the latter, I am the king of the Wannabee, no idea what I’m doing lol), but than I had to create/delete/insert and or combine JRE or JBR folders…errr yeah ok, I usually pass on those kind of solutions (unless it is of utmost importance.)
As mentioned, I prefer not to mess with installed software application folders (I remember my days with game mods and, am in a rush, than install a patch or upgrade…nooooo!), so I obviously did not follow any given solution regarding folders/dirs! Just because a solution was given, does not mean I have to blindly follow it!
Something else needed to be done, since I upgraded my Android Studio; I though “F-IT” removed Android Studio and installed it fresh. This is where I made a error: with software you know and trust, you usually just click enter, enter, enter without reading. However I did notice an “Android Studio(2)” along the path, but did not gave it any further attention.
Let’s go…
PS C:\src\flutter> flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, 3.16.0, on Microsoft Windows [Version 10.0.22623.1037], locale nl-NL)
[√] Windows Version (Installed version of Windows is version 10 or higher)
[√] Android toolchain - develop for Android devices (Android SDK version 33.0.2)
[√] Chrome - develop for the web
[√] Visual Studio - develop Windows apps (Visual Studio Community 2022 17.8.0)
[!] Android Studio (version 2022.1)
X Unable to find bundled Java version.
[√] Android Studio (version 2022.3)
[√] VS Code (version 1.84.2)
[√] Connected device (3 available)
[√] Network resources
! Doctor found issues in 1 category.
WTF...why do I have [!] Android Studio (version 2022.1) (with error) and [√] Android Studio (version 2022.3) without. What's up with these 2 versions? I do not have multiple Java installed!
Checking further, due I remembered the “Android Studio(2)”, the funny thing was, I suddenly had 3 (three) Android Studio(s) in my “Program Files” and were respectively named “Android Studio”, “Android Studio(1)” and “Android Studio(2)“. Which I guess from the un-installation, the upgrade and the latest from the new installation.
The “Android Studio” contained nothing , the “Android Studio(1)” contained a “bin”, “jbr” and a “lib” folder. The latter “Android Studio(2)” contained all folders.
- So I just deleted the “Android Studio” and “Android Studio(1)” and renamed “Android Studio(2)” to “Android Studio”.
- Let’s try it again…let’s go (again):
PS C:\src\flutter> flutter doctor --android-licenses
[=======================================] 100% Computing updates...
All SDK package licenses accepted.
PS C:\src\flutter> flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, 3.16.0, on Microsoft Windows [Version 10.0.22623.1037], locale nl-NL)
[√] Windows Version (Installed version of Windows is version 10 or higher)
[√] Android toolchain - develop for Android devices (Android SDK version 33.0.2)
[√] Chrome - develop for the web
[√] Visual Studio - develop Windows apps (Visual Studio Community 2022 17.8.0)
[√] Android Studio (version 2022.3)
[√] VS Code (version 1.84.2)
[√] Connected device (3 available)
[√] Network resources
• No issues found!
PS C:\src\flutter>
Nice, below was no longer observed and dissappeared like a ninja,
[!] Android Studio (version 2022.1)
X Unable to find bundled Java version.
and only the latest (version 2022.3) is available:
[√] Android Studio (version 2022.3)
Sweet, done, let’s go …(final)!