英文:
Unable to find bundled Java version - no jrb folder
问题
我刚刚安装了新的Android Studio Electric Eel,但flutter停止工作了。
以下是我的flutter doctor -v
结果:
[√] Flutter(稳定通道,3.7.3,运行在Microsoft Windows [版本10.0.19045.2486],语言区域en-US)
• Flutter版本3.7.3,位于E:\flutter的稳定通道上
• 上游存储库https://github.com/flutter/flutter.git
• 框架修订版9944297138(10天前),2023-02-08 15:46:04 -0800
• 引擎修订版248290d6d5
• Dart版本2.19.2
• DevTools版本2.20.1
[√] Windows版本(已安装的Windows版本为10或更高版本)
[√] Android工具链 - 用于开发Android设备(Android SDK版本30.0.3)
• Android SDK位于C:\Users\Albert\AppData\Local\Android\Sdk
• 平台android-33,构建工具30.0.3
• ANDROID_HOME = C:\Users\Albert\AppData\Local\Android\Sdk
• Java二进制文件位于:E:\Android studio\jre\bin\java
• Java版本OpenJDK Runtime Environment(构建1.8.0_242-release-1644-b01)
• 所有Android许可证已被接受
[√] Chrome - 用于Web开发
• Chrome位于C:\Program Files (x86)\Google\Chrome\Application\chrome.exe
[√] Visual Studio - 用于Windows开发(Visual Studio Community 2019 16.11.10)
• Visual Studio位于C:\Program Files (x86)\Microsoft Visual Studio\2019\Community
• Visual Studio Community 2019版本16.11.32126.315
• Windows 10 SDK版本10.0.18362.0
[!] Android Studio(版本2022.1)
• Android Studio位于E:\Android-Studio-Update-Test
• 可以从以下位置安装Flutter插件:
https://plugins.jetbrains.com/plugin/9212-flutter
• 可以从以下位置安装Dart插件:
https://plugins.jetbrains.com/plugin/6351-dart
X 无法找到捆绑的Java版本。
• 请尝试更新或重新安装Android Studio。
[√] Android Studio(版本4.1)
• Android Studio位于E:\Android studio
• 可以从以下位置安装Flutter插件:
https://plugins.jetbrains.com/plugin/9212-flutter
• 可以从以下位置安装Dart插件:
https://plugins.jetbrains.com/plugin/6351-dart
• Java版本OpenJDK Runtime Environment(构建1.8.0_242-release-1644-b01)
[√] 连接的设备(共5个可用)
• SM A325F(移动设备) • R58R60AXPXN • android-arm64 • Android 13(API 33)
• sdk gphone64 x86 64(移动设备) • emulator-5554 • android-x64 • Android 13(API 33)(模拟器)
• Windows(桌面) • windows • windows-x64 • Microsoft Windows [版本10.0.19045.2486]
• Chrome(Web) • chrome • web-javascript • Google Chrome 110.0.5481.104
• Edge(Web) • edge • web-javascript • Microsoft Edge 110.0.1587.46
[√] HTTP主机可用性
• 所有所需的HTTP主机都可用
!Doctor在1个类别中发现了问题。
我已经四处查找,似乎每个人都有相同的答案,将jbr
移动到jre
。但是我的Android Studio文件夹中没有jbr
(我的文件夹也在E:上,但这不是问题,因为所有东西都已迁移到那里)。我该怎么办?
英文:
I have just installed new Android Studio Electric Eel and flutter stopped working.
Here's my flutter doctor -v
:
PS E:\flutter-projects\json_test000> flutter doctor -v
[√] Flutter (Channel stable, 3.7.3, on Microsoft Windows [Version 10.0.19045.2486], locale en-US)
• Flutter version 3.7.3 on channel stable at E:\flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision 9944297138 (10 days ago), 2023-02-08 15:46:04 -0800
• Engine revision 248290d6d5
• Dart version 2.19.2
• DevTools version 2.20.1
[√] Windows Version (Installed version of Windows is version 10 or higher)
[√] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
• Android SDK at C:\Users\Albert\AppData\Local\Android\Sdk
• Platform android-33, build-tools 30.0.3
• ANDROID_HOME = C:\Users\Albert\AppData\Local\Android\Sdk
• Java binary at: E:\Android studio\jre\bin\java
• Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01)
• 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 2019 16.11.10)
• Visual Studio at C:\Program Files (x86)\Microsoft Visual Studio19\Community
• Visual Studio Community 2019 version 16.11.32126.315
• Windows 10 SDK version 10.0.18362.0
[!] Android Studio (version 2022.1)
• Android Studio at E:\Android-Studio-Update-Test
• 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.
[√] Android Studio (version 4.1)
• Android Studio at E:\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 1.8.0_242-release-1644-b01)
[√] Connected device (5 available)
• SM A325F (mobile) • R58R60AXPXN • android-arm64 • Android 13 (API 33)
• sdk gphone64 x86 64 (mobile) • emulator-5554 • android-x64 • Android 13 (API 33) (emulator)
• Windows (desktop) • windows • windows-x64 • Microsoft Windows [Version 10.0.19045.2486]
• Chrome (web) • chrome • web-javascript • Google Chrome 110.0.5481.104
• Edge (web) • edge • web-javascript • Microsoft Edge 110.0.1587.46
[√] HTTP Host Availability
• All required HTTP hosts are available
! Doctor found issues in 1 category.
I have already looked around and everyone seems to have the same answer, move jbr
to jre
. But I don't have jbr
in my android studio folder. (My folder is also on E: but that isn't a problem since everything is migrated there). What should I do?
答案1
得分: 1
我遇到了完全相同的问题。
解决方法:
- 在Windows资源管理器中转到您的Android Studio安装目录
- 将jrb\*复制到jre
您可以在这里找到更多详细信息:
https://github.com/flutter/flutter/issues/118502
附言:
我有一个简单的Flutter项目,6个月前运行良好。当我升级到Electric Eel版本的Android Studio时,多个问题出现了:
-
Electric Eel现在将其嵌入的Java安装到“jrb”而不是“jre”。
解决方法:将jrb\*复制到jre
-
我的项目碰巧针对SDK版本30; Electric Eel要求最低SDK版本为31
解决方法:修改您的Flutter项目的android\app\build.gradle:
android { compileSdkVersion 30 => 31 targetSdkVersion 30 => 31
-
Electric Eel需要更新的Kotlin版本
解决方法:android\app\build.gradle:
buildscript { ext.kotlin_version = '1.3.50' => '1.6.10'
英文:
I had exactly the same problem.
WORKAROUND:
- Browse to your Android Studio install directory in Windows Explorer
- Copy jrb\* to jre
You can find more details here:
https://github.com/flutter/flutter/issues/118502
PS:
I had a simple Flutter project that worked fine 6 months ago. When I upgraded Android Studio to Electric Eel, several things broke:
-
A/S Electric Eel now installs its embedded Java to "jrb" instead of "jre"
WORAROUND: copy jrb\* to jre
-
My project happened to target SDKVersion 30; Electric Eel requires minimum SDK 31
WORKAROUND: hack your Flutter project's android\app\build.gradle:
android { compileSdkVersion 30 => 31 targetSdkVersion 30 => 31
-
Electric Eel requires a newer Kotlin version
WORKAROUND:android\app\build.gradle:
buildscript { ext.kotlin_version = '1.3.50' => '1.6.10'
答案2
得分: 0
我遇到过同样的问题,然后我重新下载了海豚模拟器,所有问题都解决了。
英文:
I had this same problem and I downloaded dolphin again and all the problems were gone.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论