How to solve: Flutter-Unable to find bundled Java version(flutter doctor), after updated android studio Arctic Fox(2020.3.1) on M1 Apple Silicon

Question

Asked by Mohamad F on July 29, 2021 (source).

Im facing weird issue. Before I update my Android Studio, everything went fine in flutter doctor. Once I've updated Android Studio, when I run the doctor, it showing "Unable to find bundled Java version". Ive already downloaded Java installer and install on my M1 Mac, but after restarted, run flutter doctor still showing the same error. The weird things is, when i uninstall the Arctic Fox version, and re-install the older Android Studio version, everyhting went fine again when run the doctor. Please help to advise if any of you have encountered this issue. Thanks

Answer

Question answered by Miktad (source).

The answer is already posted here.

For Mac User:

Set Java_Home path using below article & then after applying this command.

after that type below command in terminal:

cd /Applications/Android\ Studio.app/Contents/jre

ln -s ../jre jdk

ln -s "/Library/Internet Plug-Ins/JavaAppletPlugin.plugin" jdk

flutter doctor -v
ANDROID APPLE-M1 APPLE-SILICON FLUTTER
SHARE: