this post was submitted on 20 Feb 2025
6 points (100.0% liked)

Flutter

688 readers
1 users here now

Flutter and the related logo are trademarks of Google LLC. We are not endorsed by or affiliated with Google LLC

founded 2 years ago
MODERATORS
 

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
top 1 comments
sorted by: hot top controversial new old
[–] [email protected] 1 points 1 week ago

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