For mac users, just go to where is your android studio installed
if you install android studio using the installer use
cd /Applications/Android\ Studio.app/Contents
if using JetBrains toolbox use
cd "/Users/ahmedhnewa/Library/Application Support/JetBrains/Toolbox/apps/AndroidStudio/ch-0/221.6008.13.2211.9477386/Android Studio.app/Contents"
you can go to the settings of the ide and find where it's installed
then just type
open .
so it will be opened in finder
copy the folder jbr
and rename it to jre
I think the flutter team should look into this so the flutter command line
can know where the bundled JDK is in the new android studio update.
currently, there is no recent update to the flutter tool but after it gets update the issue should be fixed without copying the jbr folder and renaming the copied one to jre
Edit
For Linux it's almost the same, just the path of android studio is different, it depend on where and how you installed it, for Windows users
just right click on the android studio on the desktop and open the file location and
do the exists same thing on all platforms
Update
You don't need to do any of this, in the latest version of flutter, it already knows where is the jwk from jbr folder, just update both flutter using:
flutter upgrade
, and your android studio ide
so you can delete the jre
folder since there is no need of it