Flutter Doctor (Incorrectly?) Reporting Android Studio Flutter Plugin Not Installed

北慕城南 提交于 2021-01-27 07:47:11

问题


When I ran flutter doctor it reports that my Android Studio Flutter and Dart plugins are not installed, even though I have the latest installed - and in fact, I can build and deploy a flutter app to a mobile device from Android Studio. I think either my config somewhere isn't correct or flutter doctor has a bug.

When I run flutter doctor -v I get the following:

d:\Dev\Flutter>flutter doctor -v
[√] Flutter (Channel master, v0.5.8-pre.264, on Microsoft Windows [Version 10.0.17134.165], locale en-AU)
    • Flutter version 0.5.8-pre.264 at D:\Dev\Flutter\Flutter
    • Framework revision b32c77a012 (12 hours ago), 2018-08-07 17:09:14 -0700
    • Engine revision 7f083e54fe
    • Dart version 2.0.0-dev.69.5.flutter-b04def964c

[√] Android toolchain - develop for Android devices (Android SDK 27.0.3)
    • Android SDK at D:\Android\sdk
    • Android NDK location not configured (optional; useful for native profiling support)
    • Platform android-27, build-tools 27.0.3
    • ANDROID_HOME = D:\Android\sdk
    • Java binary at: d:\Android\Android Studio\jre\bin\java
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1024-b02)
    • All Android licenses accepted.

[√] Android Studio
    • Android Studio at d:\Android\Android Studio
    X Flutter plugin not installed; this adds Flutter specific functionality.
    X Dart plugin not installed; this adds Dart specific functionality.
    • android-studio-dir = d:\Android\Android Studio
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1024-b02)

[√] Connected devices (1 available)
    • HTC PN071 • HT485W903981 • android-arm • Android 5.0.2 (API 21)

• No issues found!

I am running Windows 10 using Android Studio 3.1.4. I have switched flutter git branch to master. I have tried uninstall and reinstall the plugins but no success so far.

Below is my Android Studio plugin screenshot:


回答1:


Go to

Settings > languages and frameworks > flutter 

And then on the sdk path browse the directory where you have downloaded flutter. And check to see if it works




回答2:


Since you are not using the conventional C: drive. Make sure you do not have another version of android studio installed on your system. This would lead flutter to detect a different version without the flutter plugin.

If there is no duplicate installed, there may just be residual files (ie: a backup).

This is just a guess but I hope this helps :)




回答3:


Just in case someone else ran into this issue, it turns out that my channel was on 'stable' (1.22.1), switching to 'dev' solved the problem. This is a issue, will certanily been fixed in future 'stable' releases. enter image description here




回答4:


in case mine i have both android studio and intellij idea installed on my system so i uninstalled intellij idea that fixed my problem




回答5:


This isn't an issue. Just ignore it. I also only use vscode and get this "issue". Maybe it would be good changing that issue to a info or warning because it could unsettle new flutter developers.



来源:https://stackoverflow.com/questions/51747043/flutter-doctor-incorrectly-reporting-android-studio-flutter-plugin-not-instal

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!