How does Flutter doctor detects two differenct Flutter versions

Issue

I am trying to run my Flutter app on Android studio however I get the E/flutter (25907): [ERROR:flutter/lib/ui/ui_dart_state.cc(209)] Unhandled Exception: MissingPluginException(No implementation found for method getStorageDirectory on channel plugins.flutter.io/path_provider) warning when I tap a related button.
On Android Studio I have Flutter and Dart plugins enabled and when I run flutter doctor -v I see this output:

    [✓] Flutter (Channel dev, 2.10.0-0.3.pre, on Ubuntu 20.04.3 LTS 5.13.0-28-generic, locale en_CA.UTF-8)
    • Flutter version 2.10.0-0.3.pre at /root/snap/flutter/common/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision fdd0af78bb (10 days ago), 2022-01-25 22:01:33 -0600
    • Engine revision 5ac30ef0c7
    • Dart version 2.16.0 (build 2.16.0-134.5.beta)
    • DevTools version 2.9.2

[✓] Android toolchain - develop for Android devices (Android SDK version 32.1.0-rc1)
        • Android SDK at /root/Android/Sdk
        • Platform android-31, build-tools 32.1.0-rc1
        • Java binary at: PATH TO android-studio/jre/bin/java
        • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593)
        • All Android licenses accepted.
    
    [✓] Chrome - develop for the web
        • Chrome at google-chrome
    
    [✓] Android Studio (version 4.1)
        • Android Studio at PATH TO android-studio
        • Flutter plugin version 57.0.1
        • Dart plugin version 201.9380
        • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593)
    
    [✓] Connected device (2 available)
        • SM T860 (mobile) • R52MB1MGD5H • android-arm64  • Android 11 (API 30)
        • Chrome (web)     • chrome      • web-javascript • Google Chrome 92.0.4515.159
    
    [✓] HTTP Host Availability
        • All required HTTP hosts are available

So I see two different versions for Flutter/Dart as 2.10.0-0.3.pre/2.16.0 and also 57.0.1/201.9380. How is this possible and how can I prevent this?

Thanks

Solution

That is not Flutter, that is Flutter Plugin for Android Studio. Totally two different things. There is an extension page in Android Studio, you need to download Flutter extension from that page. Which you did.

• Flutter plugin version 57.0.1

This shows that extension’s version, not Flutter’s.

This extension helps you to code on Android Studio, add support for Flutter. Has nothing to do with Flutter SDK.

Android Studio Extension Page:

enter image description here

Answered By – CidQu

Answer Checked By – Cary Denson (FlutterFixes Admin)

Leave a Reply

Your email address will not be published.