flutter ✗ Unable to find bundled Java version.

created at 08-04-2021 views: 9
MacBook-Pro-2:~ liuliuwenchao$ flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 1.22.3, on Mac OS X 10.15.7 19H2, locale
[✓] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
[✓] Xcode - develop for iOS and macOS (Xcode 12.2)
[!] Android Studio (version 2020.3)
✗ Unable to find bundled Java version.
[✓] VS Code (version 1.58.2)
[!] Connected device
! Error: iPhone is not connected. Xcode will continue when iPhone is
connected. (code -13)
! Doctor found issues in 2 categories.

Execute the following command line to solve

cd /Applications/Android\ Studio.app/Contents/jre
ln -s ../jre jdk
ln -s "/Library/Internet Plug-Ins/JavaAppletPlugin.plugin" jdk

Then execute flutter doctor.

created at:08-04-2021
edited at: 08-04-2021: