I installed Flutter on Linux Mint. Also, I installed Android Studio,
but when I run flutter doctor -v
in the CLI, it gives me the error:
type here[!] Android Studio (version unknown)
• Android Studio at /opt/android-studio
• Flutter plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/6351-dart
✗ Unable to determine Android Studio version.
• Java version OpenJDK Runtime Environment (build
17.0.6+0-17.0.6b802.4-9586694)
flutter --version
Flutter 3.13.2 • channel stable • https://github.com/flutter/flutter.git
Framework • revision ff5b5b5fa6 (7 weeks ago) • 2023-08-24 08:12:28 -0500
Engine • revision b20183e040
Tools • Dart 3.1.0 • DevTools 2.25.0
Dart SDK version: 3.1.0 (stable) (Tue Aug 15 21:33:36 2023 +0000) on "linux_x64"
2
Answers
I had the same problem.
As you can see
flutter doctor -v
is finding two copies of android studio.The first one it has a version number so all is good. The second one is in the
opt/
directory which is actually just containg a link to android studio. Your just going to want to delete this link.You can do this by
cd ../../opt
and then your in the opt directory.Now run
sudo rm -r android-studio
to remove the linkThen
cd ../home/yourusername
to navigate backThen
flutter doctor -v
and you should have no issuesOn Ubuntu when Android Studio installed with snap it installed into
/snap/android-studio/current
. In Terminal enterflutter config --android-studio-dir /snap/android-studio/current
and runflutter doctor -v