-
Notifications
You must be signed in to change notification settings - Fork 26.8k
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
Unable to find bundled Java version #118502
Comments
hello there, im having same issue on my windows, were you able to resolve this issue ? |
No, I haven't found a solution yet. |
Same here on windows after upgrading Android Studio to Electric Eel.
|
+1 (Windows 10) |
same question |
me too . look like when i update Android Studio version (2022.1) happen |
Go to finder and find Android studio:
reload your terminal and type |
@roufy235 I was going crazy with this on macOS, your solution fixed it. Thanks |
WINDOWS SOLVED |
@roufy235 thanks a lot it solved my problem in Ubuntu 22 also! |
The fix works, it's a weird fix though... |
I agree with @junhan-z. |
Worked on latest macOS but I agree it is weird and I second the question, why? |
Since there are people asking why. I think this is the cause: https://github.com/flutter/flutter/blob/master/packages/flutter_tools/lib/src/android/android_studio.dart#L449-L451 The why 🤷 Perhaps a maintainer of the repo can answer that. |
Tks |
Thanks @roufy235. |
Thank You So much worked for me. |
Similar things have happened before where the developers of android studio decide to change the directory they keep stuff in for the new version. It then takes Flutter developers a week or two to pick up the issue and to change doctor to look in the new location. I'm sure it will happen again. Wish the two teams within Google would talk to each other :-) |
@nguyendviet I think you should keep this issue open, since the suggestion fix is not an actual fix. That's how an issue maintains. It needs to be triaged. |
https://www.youtube.com/watch?v=CKpS9Jij6HQ |
workaround until official fix:
|
Hello People! For windows, use environment variables. The defaults for me are:
In doing this, I just changed JAVA_HOME from:
to
|
I think this issue should not be closed, an update changed the the java home/runtime without notification or a clear error message. users only avoided this error if they had another suitable java version already installed on their system. I had java 17 installed on my system giving me a irrelevant error: |
Thank you @roufy235 it works now. I am so thankful |
This issue is related to this bug: |
This helped me, thank you so much. Same issue, android studio updated, lots of stuff broke, patched one by one then got to this issue. Flutter doctor runs and flutter run runs my app again. Thanks! |
Thanks. This worked |
mklink /J "f:\Program Files\Android\Android Studio\jre" "f:\Program Files\Android\Android Studio\jbr" Of course use your path to Android studio. |
If you use Microsoft OpenJDK and selected it in the beginning of the installation, you should run this in elevated PowerShell inside Android Studio folder
|
Just ensure that the new |
Excellent solution @roufy235, works perfect. |
Excellent solution @roufy235, thanks. |
Worked for me as well! @roufy235, thanks. |
Several updates were released for flutter and this problem is still a thing? Why? When will it be updated to reflect the changes made to Android Studio? Also, I did the workaround but find whenever Android Studio updates it removes the jre folder. |
baranhuseyinkencu@BARAN-MacBook-Air ~ % flutter doctor ! Doctor found issues in 1 category. [✓] Android toolchain - develop for Android devices (Android SDK version 33.0.2) [✓] Xcode - develop for iOS and macOS (Xcode 14.2) [✓] Chrome - develop for the web [✓] Android Studio (version 2022.1) [✓] IntelliJ IDEA Community Edition (version 2022.3.2) [✓] VS Code (version 1.75.1) [✓] Connected device (2 available) [✓] HTTP Host Availability • No issues found! baranhuseyinkencu@BARAN-MacBook-Air ~ % flutter doctor • No issues found why do i have "Intellij idea" inside the list. |
@mariamhas @christopherfujino @itsjustkevin, given the number of thumbs up for this issue, I wonder if it's something we need to patch in the next stable hot fix? As more folk upgrade to Electric Eel, it's going to become considerably more prominent in the next couple of months until the next stable release. |
Where is the jbr folder located? I have three main folders named 'Android Studio', 'Android Studio1' and 'Android Studio 2'. I updated Flutter and Android Studio today Feb 25th. So the most current updates don't have a fix going back to Jan 14th. I would like to try publishing my first app ever. Thanks. |
The delay fixing this means you've now got thousands of people with two copies of java, which may or may not stay in sync.. then you've got those that install a completely different java and override the path to work around the issue.. So a future installer is going to have to try to undo all that without breaking stuff. |
Where is the 'Applications' folder located on a Windows machine? |
On a Windows machinie look in your Android Studio installation directory |
wow It works finally 🙂❤ |
There's already a hotfix request for this issue: #121505 that everyone in this thread can follow-up on for further updates. I'll keep this issue open for reference and tracking apart from the cp issue linked in this comment. Once the cp is approved and merged, I'll close out this one. |
Works on macOS
|
Again and again. This is not actually solution, it's workaround only. Next Android Studio update will remove your symlink/folder. So, it can't be considered as solution. |
This non-fix (which people insist on reposting every day) now breaks the .1
update.. it won't install because the jre directory exists.. Google being
completely inconsistent about this.
So to upgrade
Delete jre directory
Create jre/bin/.marker (empty file which must exist)
Install update
Remove temporary jre directory
Copy jbr to jre again
This is very silly. This should have been fixed in update 1 not made worse!
This is incredibly silly.
…On Wed, 1 Mar 2023, 04:42 Nguyễn Văn Tài, ***@***.***> wrote:
This will link jbr folder to jre
cd /Applications/Android Studio.app/Contents
ln -s jbr jre
—
Reply to this email directly, view it on GitHub
<#118502 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AACALFIJBAA3HTAVAZEA553WZ3HVDANCNFSM6AAAAAAT3MNDQY>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Thank you all for your comments, and please accept our apologies. This issue was caused by a change in Android Studio after Flutter 3.7 was released. @giaur500 Correct, this is a workaround. That's why this issue is tagged with the workaround available tag. The details of the fix are here: #121505 and this will be merged in the next hotfix. @TonyHoyle I'm not sure why you think Google is "being completely inconsistent". As far as I can tell, we've made one comment on this bug, and it's to acknowledge it as a hotfix candidate. A quick reminder: let's be kind and courteous to each other in this professional space. Closing this issue and locking it since we have the information we need to resolve the bug and a workaround is clearly posted. |
Steps to Reproduce
My specs:
This is my
.zshrc
:I've tried:
This is similar to these tickets but it's not resolved:
The text was updated successfully, but these errors were encountered: