Flutter官网 https://flutterchina.club/html
win + R 快捷键,输入cmd,回车,输入flutter doctor,回车。android
Windows PowerShell
版权全部 (C) Microsoft Corporation。保留全部权利。
PS C:\Users\boy> flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, v1.2.1, on Microsoft Windows [Version 10.0.17134.590], locale zh-CN)
[X] Android toolchain - develop for Android devices
X Unable to locate Android SDK.
Install Android Studio from: https://developer.android.com/studio/index.html
On first launch it will assist you in installing the Android SDK components.
(or visit https://flutter.io/setup/#android-setup for detailed instructions).
If Android SDK has been installed to a custom location, set ANDROID_HOME to that location.
You may also want to add it to your PATH environment variable.
[!] Android Studio (not installed)
[!] Connected device
! No devices available
! Doctor found issues in 3 categories.
PS C:\Users\boy> ^C
PS C:\Users\boy>
复制代码
报错bash
[X] If Android SDK has been installed to a custom location, set ANDROID_HOME to that location.
You may also want to add it to your PATH environment variable.
复制代码
解决问题 配置ANDROID_HOME环境变量而且添加到pathui
运行 flutter doctorthis
Windows PowerShell
版权全部 (C) Microsoft Corporation。保留全部权利。
PS C:\Users\boy> flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, v1.2.1, on Microsoft Windows [Version 10.0.17134.590], locale zh-CN)
[√] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
[!] Android Studio (not installed)
[!] Connected device
! No devices available
复制代码
报错google
[!] Android Studio (not installed)
复制代码
解决方案:下载最新的Android Studio,自行安装便可。 https://developer.android.google.cn/studiospa
运行 flutter doctor插件
Windows PowerShell
版权全部 (C) Microsoft Corporation。保留全部权利。
PS C:\Users\boy> flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, v1.2.1, on Microsoft Windows [Version 10.0.17134.590], locale zh-CN)
[√] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
[!] Android Studio (version 3.3)
X Flutter plugin not installed; this adds Flutter specific functionality.
X Dart plugin not installed; this adds Dart specific functionality.
[!] IntelliJ IDEA Ultimate Edition (version 2018.2)
X Flutter plugin not installed; this adds Flutter specific functionality.
X Dart plugin not installed; this adds Dart specific functionality.
[√] Connected device (1 available)
复制代码
报错3d
[!] Android Studio (version 3.3)
X Flutter plugin not installed; this adds Flutter specific functionality.
X Dart plugin not installed; this adds Dart specific functionality.
复制代码
解决方案 须要安装两个插件:调试
要安装这些:
启动Android Studio.
具体安装以下:
运行 flutter doctor
Windows PowerShell
版权全部 (C) Microsoft Corporation。保留全部权利。
PS C:\Users\boy> flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, v1.2.1, on Microsoft Windows [Version 10.0.17134.590], locale zh-CN)
[√] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
[√] Android Studio (version 3.3)
[!] IntelliJ IDEA Ultimate Edition (version 2018.2)
X Flutter plugin not installed; this adds Flutter specific functionality.
X Dart plugin not installed; this adds Dart specific functionality.
[√] Connected device (1 available)
! Doctor found issues in 1 category.
复制代码
[!] IntelliJ IDEA Ultimate Edition (version 2018.2)这个是IntelliJ IDEA编译器,咱们只要Android Studio可用就好,你们忽视就好。