Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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?

like image 855
Mohamad Faris Avatar asked Jul 29 '21 02:07

Mohamad Faris


People also ask

Which version of Java is compatible with flutter?

Requirements to create Flutter project Java 11 JDK installed and set in system environment variables. Flutter and Dart extension installed. Connected Device with laptop for run and test flutter applications.

Does flutter work with Java 11?

flutter - Android Gradle plugin requires Java 11 to run.


1 Answers

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 
like image 69
Miktad Avatar answered Oct 07 '22 06:10

Miktad