Unable to find bundled Java version with flutter doctor, after updating Android studio Arctic Fox(2020.3.1) on M1 Apple Silicon

Mohamad Faris picture Mohamad Faris · Jul 29, 2021 · Viewed 36.7k times · Source

I'm facing a weird issue. Before I updated my Android Studio, everything went fine in flutter doctor. Once I've updated Android Studio, when I run the doctor, it's showing "Unable to find bundled Java version". I've already downloaded Java installer and installed it on my M1 Mac, but after I restarted, running flutter doctor still shows the same error. The weird thing is, when I uninstall the Arctic Fox version and re-install the older Android Studio version, everything goes fine again when running the doctor. How can I resolve this?

Answer

Miktad picture Miktad · Aug 1, 2021

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