-
Notifications
You must be signed in to change notification settings - Fork 27.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot find bundled Java version on AS 2022.1.1.x (Electric Eel) #106674
Comments
Please note following comment: https://issuetracker.google.com/issues/237019251#comment2 |
Hi @RoarGronmo, thanks for filing the issue |
The first suggestion is a no op, since I rely on older versions to have a backend to run into when newer versions doesn't work as expected. The second is a known issue, and my environment works as expected with my environment settings as is, except for the AS EE C5 update which suddenly points to new locations where JDK 11 wasn't installed. At the moment I rely on AS Chipmunk for Flutter projects and I use AS EE on kotlin projects. While updating (first start) of AS EE, I think I got a question if I want to use embedded JDK version and I fell back to that one, unknowningly if it used the JAVA_HOME defined one or the one actually installed aside AS. At the moment it seems that AS EE works, but Flutter doesn't find it since AS EE C4+ has changed it's standard position. In my point of view, AS / IntelliJ should rely on its own JDK defined location, until the user overrides it in AS settings. And AS should clearly emphasize which versions are in use and where/how they are used. I am in Windows 11 and for inexperienced users, it is quite cumbersome to find the environment variables and change them. I install AS with "downlading zip, unblock, unpack and move folder to Program Files"- method. |
@RoarGronmo I also confirm that the issue is reproducible on the latest flutter doctor -v (Windows)[√] Flutter (Channel stable, 3.0.3, on Microsoft Windows [Version 10.0.19043.1766], locale en-US)
• Flutter version 3.0.3 at C:\WIP\flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision 676cefaaff (6 days ago), 2022-06-22 11:34:49 -0700
• Engine revision ffe7b86a1e
• Dart version 2.17.5
• DevTools version 2.12.2
[√] Android toolchain - develop for Android devices (Android SDK version 32.0.0)
• Android SDK at C:\AndroidSDK
• Platform android-32, build-tools 32.0.0
• ANDROID_HOME = C:\AndroidSDK
• Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
• Java version OpenJDK Runtime Environment (build 11.0.12+7-b1504.28-7817840)
• All Android licenses accepted.
[√] Chrome - develop for the web
• Chrome at C:\Program Files (x86)\Google\Chrome\Application\chrome.exe
[√] Visual Studio - develop for Windows (Visual Studio Community 2022 17.2.5)
• Visual Studio at C:\Program Files\Microsoft Visual Studio\2022\Community
• Visual Studio Community 2022 version 17.2.32616.157
• Windows 10 SDK version 10.0.19041.0
[√] Android Studio (version 2021.2)
• Android Studio at C:\Program Files\Android\Android Studio
• Flutter plugin can be installed from:
https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
https://plugins.jetbrains.com/plugin/6351-dart
• Java version OpenJDK Runtime Environment (build 11.0.12+7-b1504.28-7817840)
[!] Android Studio (version 2022.1)
• Android Studio at C:\Program Files\Android\Android Studio Electric Eel 2022.1.1
• Flutter plugin can be installed from:
https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
https://plugins.jetbrains.com/plugin/6351-dart
X Unable to find bundled Java version.
• Try updating or re-installing Android Studio.
[√] VS Code (version 1.68.1)
• VS Code at C:\Users\ADMIN\AppData\Local\Programs\Microsoft VS Code
• Flutter extension version 3.42.0
[√] Connected device (3 available)
• Windows (desktop) • windows • windows-x64 • Microsoft Windows [Version 10.0.19043.1766]
• Chrome (web) • chrome • web-javascript • Google Chrome 102.0.5005.115
• Edge (web) • edge • web-javascript • Microsoft Edge 101.0.1210.53
[√] HTTP Host Availability
• All required HTTP hosts are available
! Doctor found issues in 1 category. flutter doctor -v (Mac)[✓] Flutter (Channel stable, 3.0.3, on macOS 12.2.1 21D62 darwin-x64, locale en-VN)
• Flutter version 3.0.3 at /Users/huynq/Documents/GitHub/flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision 676cefaaff (6 days ago), 2022-06-22 11:34:49 -0700
• Engine revision ffe7b86a1e
• Dart version 2.17.5
• DevTools version 2.12.2
[✓] Android toolchain - develop for Android devices (Android SDK version 31.0.0)
• Android SDK at /Users/huynq/Library/Android/sdk
• Platform android-33, build-tools 31.0.0
• ANDROID_HOME = /Users/huynq/Library/Android/sdk
• Java binary at: /Applications/Android Studio.app/Contents/jre/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 11.0.12+0-b1504.28-7817840)
• All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS (Xcode 13.3)
• Xcode at /Applications/Xcode.app/Contents/Developer
• CocoaPods version 1.11.3
[✓] Chrome - develop for the web
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
[✓] Android Studio (version 2021.2)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/6351-dart
• Java version OpenJDK Runtime Environment (build 11.0.12+0-b1504.28-7817840)
[!] Android Studio
• Android Studio at /Users/huynq/Downloads/Android Studio Preview.app/Contents
• Flutter plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/6351-dart
✗ Unable to find bundled Java version.
• Try updating or re-installing Android Studio.
[✓] IntelliJ IDEA Community Edition (version 2020.3.3)
• IntelliJ at /Applications/IntelliJ IDEA CE.app
• Flutter plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/6351-dart
[✓] IntelliJ IDEA Community Edition (version 2022.1.1)
• IntelliJ at /Users/huynq/Library/Application Support/JetBrains/Toolbox/apps/IDEA-C/ch-0/221.5591.52/IntelliJ IDEA CE.app
• Flutter plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/6351-dart
[✓] VS Code (version 1.68.1)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.42.0
[✓] Connected device (2 available)
• macOS (desktop) • macos • darwin-x64 • macOS 12.2.1 21D62 darwin-x64
• Chrome (web) • chrome • web-javascript • Google Chrome 103.0.5060.53
[✓] HTTP Host Availability
• All required HTTP hosts are available
! Doctor found issues in 1 category. Labeling this issue for further support/investigation. |
Will just mention (as you may be aware of) that the same problem exists for AS Flamingo, at least for Canary 3. |
I am using:
My
|
Coming here from #113775. This issue may be caused by the fact that newer versions of Android Studio come with JBR as a bundled Java version. If Flutter Tools included the directory |
As a workaround I have just created a symbolic link. # ln -s TARGET LINK_NAME
ln -s /usr/lib/jvm/java-17 $USER/.local/lib/android-studio/jre
|
@justintime4tea How to solve this problem under windows11: $ flutter doctor -v [✓] Android toolchain - develop for Android devices (Android SDK version 33.0.1) [✓] Chrome - develop for the web [✓] Visual Studio - develop for Windows (Visual Studio Community 2022 17.4.1) [!] Android Studio (version 2022.2) [✓] IntelliJ IDEA Ultimate Edition (version 2021.2) [✓] Proxy Configuration [✓] Connected device (2 available) [✓] HTTP Host Availability ! Doctor found issues in 1 category. |
@git136975643 try creating a symbolic link within your Android Studio directory with the name "jre" with the target being your java JDK directory. From the look of your logs, maybe this will work? (PowerShell)
Afterwards try running flutter doctor again. This is essentially the Windows equivalent to my previous comment. |
Uninstall and install flutter or permanently set the JAVA environment variable(JAVA_HOME) to your locally installed JDK path, if it doesn’t work, just |
For windows 11 this worked for me.
|
For MacBook M1: Step 1: Change directory to the subdirectory (Contents) of the Android Studio forder:
Step 2: Create a symbolic link named jre and point it to jbr:
|
Just upgraded to Electic Eel now and having the same issue on Win10. |
This worked for me on Ubuntu 22.04.1 LTS, so this instruction is not just for Mac. |
Good to know this approach works here too. I think this works on all Unix-like systems - use the same shell command. Step 1: Change directory to the subdirectory (Contents) of the Android Studio forder:
Step 2: Create a symbolic link named jre and point it to jbr:
|
This is still broken in macOS. I just upgraded AS to Electric Eel 2022.1.1 Patch 1 and Flutter doctor throws the same old error. And what is worse, the |
#119244 is reverted. |
I will work to get this re-landed |
was this issue resolved, my electric eel displayed a similar error on running |
Yes but it has still not found its way into |
Check out this guide. Worked fine on my m1. |
This is the correct way to
|
Seems to be solved in beta 3.8.0:
|
https://github.com/flutter/flutter/wiki/Hotfixes-to-the-Stable-Channel |
Hi,
In Windows environment configuration To resolve the problem I reverted to the old workaround of making a symbolic link from My flutter doctor output is:
|
@under3415 Please file a new issue. That will be a much more effective place to investigate and resolve the issue you're seeing than the thread for this old fixed issue is. When you do, please include the command you're running and its complete output. |
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of |
Thanks for the feedback! If your issue is related to the Flutter framework itself,
please open an issue at
github.com/flutter/flutter.
Steps to Reproduce
Was redirected here to file an issue when using AS Chipmunk and running flutter doctor which complaints about missing bundled Java version in AS Electric Eel. See issue: https://issuetracker.google.com/237019251
Referencing it here:
Build: AI-212.5712.43.2112.8609683, 202205181650,
AI-212.5712.43.2112.8609683, JRE 11.0.12+7-b1504.28-7817840x64 JetBrains s.r.o, OS Windows 10(amd64) v10.0 , screens 1920.0x1080.0, 1920.0x1080.0, 1920.0x1080.0, 768.0x1366.0
AS: Chipmunk | 2021.2.1 Patch 1; Kotlin plugin: 212-1.7.0-release-281-AS5457.46; Android Gradle Plugin: (plugin information not found); Gradle: (gradle version information not found); Gradle JDK: version 11.0.12; NDK: from local.properties: (not specified), latest from SDK: (not found); LLDB: pinned revision 3.1 not found, latest from SDK: (package not found); CMake: from local.properties: (not specified), latest from SDK: (not found), from PATH: (not found)
IMPORTANT: Please read https://developer.android.com/studio/report-bugs.html carefully and supply all required information.
Is this a known issue that AS Electic Eel don't provide known bundled java location when using it with Flutter 3.1 (beta) ? (seen from ChipMunk flutter doctor).
May this be related to same foundation problem discovered in AS EE after ugrade to AS EE C4 (or C5): https://issuetracker.google.com/issues/236055498
Version info
Please paste the output of running
flutter doctor -v
here (available from the commandline or from
Tools > Flutter > Flutter Doctor
). It will provide the version of theFlutter framework as well as of the IntelliJ plugin.
The text was updated successfully, but these errors were encountered: