如何修复“无法找到捆绑的Java版本”从flutter医生输出

6l7fqoea  于 2023-01-18  发布在  Flutter
关注(0)|答案(1)|浏览(153)

请看下面的flutter doctor输出。我不知道如何在android studio下修复这个问题。所有的东西都是最新安装的。

Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, 3.3.10, on Microsoft Windows [Version 10.0.19044.2486], locale en-US)
[√] Android toolchain - develop for Android devices (Android SDK version 29.0.3)
[√] Chrome - develop for the web
[√] Visual Studio - develop for Windows (Visual Studio Build Tools 2019 16.11.22)
[!] Android Studio (version 2022.1)
    X Unable to find bundled Java version.
[√] VS Code (version 1.74.3)
[√] Connected device (3 available)
[√] HTTP Host Availability

Flutter医生-v

Flutter (Channel stable, 3.3.10, on Microsoft Windows [Version 10.0.19044.2486], locale en-US)
    • Flutter version 3.3.10 on channel stable at C:\src\flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 135454af32 (4 weeks ago), 2022-12-15 07:36:55 -0800
    • Engine revision 3316dd8728
    • Dart version 2.18.6
    • DevTools version 2.15.0

[√] Android toolchain - develop for Android devices (Android SDK version 29.0.3)
    • Android SDK at C:\Users\rupena\AppData\Local\Android\sdk
    • Platform android-29, build-tools 29.0.3
    • Java binary at: C:\Program Files (x86)\Java\jre1.8.0_271\bin\java
    • Java version Java(TM) SE Runtime Environment (build 1.8.0_271-b09)
    • 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 Build Tools 2019 16.11.22)
    • Visual Studio at C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools
    • Visual Studio Build Tools 2019 version 16.11.33130.400
    • Windows 10 SDK version 10.0.19041.0

[!] Android Studio (version 2022.1)
    • 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
    X Unable to find bundled Java version.
    • Try updating or re-installing Android Studio.

[√] VS Code (version 1.74.3)
    • VS Code at C:\Users\rupena\AppData\Local\Programs\Microsoft VS Code
    • Flutter extension version 3.32.0

[√] Connected device (3 available)
    • Windows (desktop) • windows • windows-x64    • Microsoft Windows [Version 10.0.19044.2486]
    • Chrome (web)      • chrome  • web-javascript • Google Chrome 108.0.5359.126
    • Edge (web)        • edge    • web-javascript • Microsoft Edge 108.0.1462.76

[√] HTTP Host Availability
    • All required HTTP hosts are available

我尝试更新Android Studio。我还检查了JAVA环境变量值,系统中确实有该路径。JAVA_HOME是环境变量中的C:\Program Files(x86)\Java\jre1.8.0_271。

相关问题