Flutter 安装过程记录(Android studio)

2020-02-26  本文已影响0人  Blue_Color

在已下载并配置好了Android studio的情况下Flutter的安装

1.下载flutter(系统 Windows 10)

https://flutter.dev/docs/development/tools/sdk/releases#windows

2.解压

在‘C:\flutter’解压flutter文件

3.配置环境

在导航栏的搜索框中输入‘env’,打开找到’环境变量‘,在’系统变量‘中的’path‘中添加flutter的bin目录地址

如我的地址是:’C:\flutter\flutter\bin‘

4.Android studio中flutter的配置

打开Android studio,找到’File‘-->'setting'-->'Plugins',在搜索框中输入’flutter‘,找到’Flutter‘,

点击’Install‘,会有弹框,点击’OK‘,同时会提醒安装’Dart‘插件,选择’Accpet‘,

下载完成以后重启studio。

5.在导航栏的搜索框中输入Windows PowerShell,打开后输入flutter doctor检测flutter安装状况。

如:flutter doctor

Doctor summary (to see all details, run flutter doctor -v):

[√] Flutter (Channel stable, v1.12.13+hotfix.8, on Microsoft Windows [Version 10.0.18362.657], locale zh-CN)

[!] Android toolchain - develop for Android devices (Android SDK version 29.0.2)

    ! Some Android licenses not accepted.  To resolve this, run: flutter doctor --android-licenses

[√] Android Studio (version 3.4)

[!] Connected device

    ! No devices available

! Doctor found issues in 2 categories.

报了错(Some Android licenses not accepted.  To resolve this, run: flutter doctor --android-licenses)

可以运行flutter doctor --android-licenses

然后一直输入 y 就可以了

再次运行flutter doctor

Doctor summary (to see all details, run flutter doctor -v):

[√] Flutter (Channel stable, v1.12.13+hotfix.8, on Microsoft Windows [Version 10.0.18362.657], locale zh-CN)

[√] Android toolchain - develop for Android devices (Android SDK version 29.0.2)

[√] Android Studio (version 3.4)

[!] Connected device

    ! No devices available

上一篇下一篇

猜你喜欢

热点阅读