-
Notifications
You must be signed in to change notification settings - Fork 27.3k
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. #76215
Comments
@ashut08 export PATH="$PATH:/usr/bin/java"
export JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk-amd64/jre if the issue persists please provide the output of:
|
Error are persistent attaching output of the follow command
|
Hi @ashut08
flutter doctor -v[✓] Flutter (Channel stable, 1.22.6, on macOS 11.2.1 20D74 darwin-x64, locale en-GB)
• Flutter version 1.22.6 at /Users/tahatesser/Code/flutter_stable
• Framework revision 9b2d32b605 (4 weeks ago), 2021-01-22 14:36:39 -0800
• Engine revision 2f0af37152
• Dart version 2.10.5
[✗] Android toolchain - develop for Android devices
✗ Unable to locate Android SDK.
Install Android Studio from: https://developer.android.com/studio/index.html
On first launch it will assist you in installing the Android SDK components.
(or visit https://flutter.dev/docs/get-started/install/macos#android-setup for detailed instructions).
If the Android SDK has been installed to a custom location, set ANDROID_SDK_ROOT to that location.
You may also want to add it to your PATH environment variable.
[!] Xcode - develop for iOS and macOS (Xcode 12.4)
• Xcode at /Volumes/Extreme/Xcode.app/Contents/Developer
• Xcode 12.4, Build version 12D4e
✗ CocoaPods not installed.
CocoaPods is used to retrieve the iOS and macOS platform side's plugin code that responds to your plugin usage on the Dart side.
Without CocoaPods, plugins will not work on iOS or macOS.
For more info, see https://flutter.dev/platform-plugins
To install:
sudo gem install cocoapods
[!] Android Studio (version 4.1)
• Android Studio at /Applications/Android Studio.app/Contents
✗ Flutter plugin not installed; this adds Flutter specific functionality.
✗ Dart plugin not installed; this adds Dart specific functionality.
• Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6915495)
[✓] VS Code (version 1.53.2)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.19.0
[!] Connected device
! No devices available
! Doctor found issues in 4 categories. Thank you |
Without additional information, we are unfortunately not sure how to resolve this issue. Could everyone who still has this problem please file a new issue with the exact description of what happens, logs, and the output of |
Had this issue of Changed my Android Studio (Stable Version) to solve the issue Here are the Beta Android Studio
Stable Android Studio
Even after this issue persist then
|
i am having this issue flutter doctor -v
which java
|
There should be check for join(directory, 'jre', 'Contents', 'Home') instead ofjoin(directory, 'jre', 'jdk', 'Contents', 'Home') for newest android studio previews (at least on macos). Workaround for such people: copy folder /Applications/Android Studio Preview.app/Contents/jre/Contents to/Applications/Android Studio Preview.app/Contents/jre/jdk/Contents
|
Anyone who is still facing this error, follow the below instructions Just rename your Android Studio Preview to Preview Android Studio, and you are good to go. |
@RblSb Thanks. This worked for. me too. |
Jeez it fixed my problem as well @RblSb Thanks!! |
I just uninstall android studio and then I installed android studio again and update the plugin. It works fine for me |
LOL this worked for me as well. |
great this worked on my mac m1 |
This also resolves the stable channel release from July 28. Wonky. |
it is fixed on master channel so you can do:
and change back when fix in stable |
Solved ✅ |
Work for me |
please if you can tell me how I can make it , Im new |
I don't find this /Applications/Android Studio Preview.app/Contents/jre/jdk/Contents |
Where do you find this file? |
@RblSb thanks! this works. Maybe for those who can't find it:
|
On Mac Big Sur it isn't called Android Studio Preview, it's called Android Studio.app When I changed it to Android Studio Preview.app, then ran flutter doctor I sure didn't have a java problem anymore, instead I got "Android Studio (not installed)" |
Hi Team, I am using macOS Catalina (Version 10.15.7) and getting the below error. Unable to find bundled Java version. My Java Version gaurav_shar@LP-abc ~ % which java gaurav_shar@LP-abc ~ % which javac gaurav_shar@LP-abc ~ % javac -version gaurav_shar@LP-abc ~ %flutter doctor -v [✓] Android toolchain - develop for Android devices (Android SDK version 31.0.0) [!] Xcode - develop for iOS and macOS [✓] Chrome - develop for the web [!] Android Studio (version 2020.3) [✓] VS Code (version 1.58.0) [✓] Connected device (1 available) ! Doctor found issues in 2 categories. |
Thanks, this worked for me ❤️ |
Remove the
|
For me it only works when i do |
This resolution solved my issue, it seems android studio version arctic-fox2020-3-1 problem: 1. cd /Applications/Android\ Studio.app/Contents/jre
2. ln -s ../jre jdk
3. ln -s "/Library/Internet Plug-Ins/JavaAppletPlugin.plugin" jdk
4. flutter doctor -v |
This works for me. |
This works for me. Create the /jdk/Contents dir in /Applications/Android.app/Contents/jre/ and copy the whole contents of /Applications/Android Studio.app/Contents/jre/Contents to /Applications/Android Studio Preview.app/Contents/jre/jdk/Contents Thanks |
worked for me thank you |
The problem seems to be that the jdk/jre directory isn't where Android Studio expects it, and What worked for me on Big Sur was to add the following line to
Then restart Android Studio. |
For me and my M1 Macbook 13" the problem was that I installed Android Studio.app in a local folder (~/stack/Android Studio.app). The "copy jre ->jre/jdk" solution corrupted the .app folder What worked for me was installing Android Studio.app in my /Applications folder Here's my
|
I was able to run flutter project, and no issues found in And this works. Thanks. ps: my path is |
Thank yfer, it work for me |
Thanks a lot it worked on (Android Studio Arctic Fox | 2020.3.1 Patch 1 |
For JetBrains ToolBox, MBP (m1), JDK 1.8) users copy folder: |
It worked for me |
It worked for me. Thanks! |
Rename
|
it's worked but I can't build an apk after applying this. |
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 |
The text was updated successfully, but these errors were encountered: