我已经将我的Android Studio版本Dolphin更新为Electric Eel。现在我在flutter医生中遇到错误,无法找到捆绑包java版本。我尝试在Android Studio Native中配置jdk并能够成功运行应用程序,但如果我打开flutter项目,它会给我下面的错误
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:packageQaDebug'.
> `A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade`
> `com.android.ide.common.signing.KeytoolException: Failed to read key AndroidDebugKey from store "/home/vasudev1/.android/debug.keystore": Invalid keystore format`
运行flutter医生我得到了下面的日志
[✓] Flutter (Channel unknown, 3.0.4, on NJOS7-ver-3.8 5.12.4-051204-generic,
locale en_IN)
• Flutter version 3.0.4 at
/home/user/Development/flutter/flutter_2_0_6
• Upstream repository unknown
• Framework revision 85684f9300 (7 months ago), 2022-06-30
13:22:47 -0700
• Engine revision 6ba2af10bb
• Dart version 2.17.5
• DevTools version 2.12.2
[✓] Android toolchain - develop for Android devices (Android SDK
version 33.0.0)
• Android SDK at /home/user/Android/Sdk
• Platform android-33, build-tools 33.0.0
• Java binary at: /usr/bin/java
• Java version OpenJDK Runtime Environment (build1.8.0_282-8u282-
b08-0ubuntu1~20.04-b08)
• All Android licenses accepted.
[!] Android Studio (version 2022.1)
• Android Studio at /home/user/Development/android-studio
• Flutter plugin version 71.2.4
• Dart plugin version 221.6091
✗ Unable to find bundled Java version.
• Try updating or re-installing Android Studio.
`! Doctor found issues in 2 categories`.
我如何解决这个问题?
适用于Mac M1上的Android Studio电动鳗鱼
flutter医生-v
。“无法找到捆绑的Java版本”警告将消失。
我认为问题是jre的文件夹在Electric Eel中被重命名为jbr
打开终端并运行以下操作
cd /Applications/Android\Studio.app/Contents/
ln-s jbr jre
应该为任何寻找jre文件夹的东西创建模拟链接
同样的想法:
ln-s jbr jre
只需在android studio中打开/创建任何原生android项目。它会自动给你JDK11安装提示。只需安装/配置它,你就完成了所有其他flutter项目。