Android Studio提示Unable to find bundled Java version错误求助
问题描述
Flutter检测Android Studio时提示无法找到捆绑的Java版本:
[!] Android Studio (version 2022.1) • 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 ✗ Unable to find bundled Java version. • Try updating or re-installing Android Studio.
- 尝试通过命令
cd /Applications/Android\ Studio.app/Contents/jre定位目录,但Contents文件夹下没有jre目录 - 已下载openjdk版本"16.0.1",且重新安装了Android Studio,问题仍未解决
解决方法
Android Studio 2022.1及后续版本中,捆绑的Java目录从jre改为了jbr,但Flutter仍默认查找旧的jre路径,只需创建软链接即可解决:
- 打开终端,执行以下命令创建软链接:
ln -s /Applications/Android\ Studio.app/Contents/jbr /Applications/Android\ Studio.app/Contents/jre
- 重新运行
flutter doctor验证,问题即可修复
内容的提问来源于stack exchange,提问作者Dayeon Yoon
相关产品推荐
相关产品推荐

