Go to finder and find Android studio:
right click and click show package contents
Create a new folder called jre
copy the contents of the jbr folder and paste them into jre folder
reload your terminal and type flutter doctor
WINDOWS SOLVED
GO TO
C:\Program Files\Android\Android Studio
then copy the content of jbr and paste the content into jre folder
run doctor again and problem solved
flutter doctor -v
[!] Android Studio (version 2022.1)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/...
• Dart plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/...
✗ Unable to find bundled Java version.
• Try updating or re-installing Android Studio.