cross-posted from: https://lemm.ee/post/56160274
I install Android Studio via flatpak, and this can cause flutter doctor to not be able to determine the version or to not recognize the installation at all. I’ve managed a hacky fix for this by running a few commands that I run as a simple script that I’m sharing here. If you use this, just close Android Stuido after it is opened; it seems to just need to be opened once in order to be recognized by flutter doctor.
#!/bin/bash flutter config --android-studio-dir=/var/lib/flatpak/app/com.google.AndroidStudio/current/active/files/extra/android-studio /var/lib/flatpak/app/com.google.AndroidStudio/current/active/files/extra/android-studio/bin/studio flutter config --android-studio-dir="" flutter doctor
I gave up and installed it all via snaps originally but this is great stuff. well done!
I wish the flutter sdk was less reliant on snaps out of the box