Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.8k views
in Technique[技术] by (71.8m points)

flutter - Unable to find bundled Java version. MacBook Air M1

I was using flutter on MacBook Pro with intel. It was working fine. Now I switch to MacBook Air with M1 chip. I get error Unable to find bundled Java version. How can I fix it pleas? flutter doctor -v
[?] Flutter (Channel stable, 2.2.3, on macOS 11.2 20D64 darwin-arm, locale en-KW) ? Flutter version 2.2.3 at /Users/mac/FlutterDev/flutter ? Framework revision f4abaa0735 (5 weeks ago), 2021-07-01 12:46:11 -0700 ? Engine revision 241c87ad80 ? Dart version 2.13.4

[?] Android toolchain - develop for Android devices (Android SDK version 31.0.0) ? Android SDK at /Users/mac/Library/Android/sdk ? Platform android-31, build-tools 31.0.0 ? Java binary at: /Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/bin/java ? Java version Java(TM) SE Runtime Environment (build 1.8.0_301-b09) ? All Android licenses accepted.

[?] Xcode - develop for iOS and macOS ? Xcode at /Applications/Xcode.app/Contents/Developer ? Xcode 12.5.1, Build version 12E507 ? CocoaPods version 1.10.2

[?] Chrome - develop for the web ? Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[!] Android Studio (version 2020.3) ? 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.

[?] Connected device (2 available) ? macOS (desktop) ? macos ? darwin-arm64 ? macOS 11.2 20D64 darwin-arm ? Chrome (web) ? chrome ? web-javascript ? Google Chrome 92.0.4515.131

! Doctor found issues in 1 category.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

I fix it by changing Contents folder location. from

/Applications/Android Studio Preview.app/Contents/jre/Contents

to

/Applications/Android Studio Preview.app/Contents/jre/jdk/Contents

after close the android studio preview I face a problem with start it again. but in general flutter doctor works with no Issues.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...