当前位置: 首页 > 知识库问答 >
问题:

Android Studio flutter和dart插件未被flutter doctor识别,但安装了插件

毛德华
2023-03-14

我正在尝试在ubuntu上安装flutter,android studio flutter和dart插件已经安装,但是flutter Doctor说没有安装。一开始,即使安装了flutter doctor也找不到我的android studio和sdk,然后通过使用以下命令配置android studio和sdk的自定义目录来解决这个问题:flutter config--android-studio-dir=/my/local/path/for/android/studio flutter config--android-studio-dir=/my/local/path/for/sdk,但是找不到任何解决方案如何显示flutter doctor的android studio安装的插件目录

```
[✓] Flutter (Channel beta, v0.7.3, on Linux, locale en_US.UTF-8)
    • Flutter version 0.7.3 at /home/zayniddin/flutter
    • Framework revision 3b309bda07 (2 weeks ago), 2018-08-28 12:39:24 -0700
    • Engine revision af42b6dc95
    • Dart version 2.1.0-dev.1.0.flutter-ccb16f7282

[✓] Android toolchain - develop for Android devices (Android SDK 28.0.2)
    • Android SDK at /home/zayniddin/Documents/Sdk
    • Android NDK location not configured (optional; useful for native profiling support)
    • Platform android-28, build-tools 28.0.2
    • Java binary at: /home/zayniddin/Documents/android-studio/jre/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1024-b01)
    • All Android licenses accepted.

[✓] Android Studio
    • Android Studio at /home/zayniddin/Documents/android-studio
    ✗ Flutter plugin not installed; this adds Flutter specific functionality.
    ✗ Dart plugin not installed; this adds Dart specific functionality.
    • android-studio-dir = /home/zayniddin/Documents/android-studio
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1024-b01)

[✓] IntelliJ IDEA Community Edition (version 2018.2)
    • IntelliJ at /snap/intellij-idea-community/77
    • Flutter plugin version 28.0.4
    • Dart plugin version 182.4323.44

[✓] VS Code (version 1.27.1)
    • VS Code at /usr/share/code
    • Flutter extension version 2.18.0

[!] Connected devices
    ! No devices available

! Doctor found issues in 1 category.

```

有什么办法吗?请帮帮我

共有1个答案

汤才捷
2023-03-14

这是在Android Studio中安装flutter的步骤:

1.Go to Settings->Plugin->Install Flutter and Dart->Restart Android Studio
2.Download  the flutter sdk
3.In the environment Variable->User Variable->
ANDROID_HOME F:\AndroidSDK(Paste your Android SDK Path)
Path:F:\AndroidSDk;(Paste your Android SDK Path)
     c:\ProgramFiles\Java\jdk\1.8.0_20\bin;(Paste your jdk Path)
     c:\Users\Desktop\flutter\bin;(Paste your Flutter SDK Path)
4.Git install at c:\ProgramFiles\Git
5.Open Gitbash
$flutter doctor
$flutter doctor --android-licenses
Accept the licences Y Y Y Y
Make sure your Device should be connected your PC   
 类似资料: