Flutter开发之——Linux上搭建Flutter开发环境,Android入门视频教程

四 运行flutter doctor


4.1 请先检查是否已安装git

git --version

如果未安装,请先执行如下指令

sudo apt-get install git

4.2 运行 flutter doctor

4.2.1 执行flutter doctor前,会下载dart,请确认已安装curl

sudo apt-get install curl

4.2.2 执行flutter doctor

4.3 解决错误问题

4.3.1 Android license status unknown

按照提示,执行指令

flutter doctor --android-licenses

出现提示时,输入y

Accept? (y/N): y

All SDK package licenses accepted

执行flutter doctor后,提示信息如下

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

[✓] Flutter (Channel master, 1.26.0-2.0.pre.402, on Linux, locale zh_CN.UTF-8)

[✓] Android toolchain - develop for Android devices (Android SDK version

30.0.3)

[✗] Chrome - develop for the web (Cannot find Chrome executable at

google-chrome)

! Cannot find Chrome. Try setting CHROME_EXECUTABLE to a Chrome

executable.

[!] Android Studio (not installed)

[!] Connected device

! No devices available

! Doctor found issues in 3 categories.

4.3.2 Cannot find Chrome

下载chrome

wget https://dl.google.com/linux/direct/google-chrome-stable_current_i386.deb //32位版本

wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb //64位版本

安装chrome

sudo dpkg -i google-chrome*

sudo apt-get -f install

执行flutter doctor

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

[✓] Flutter (Channel master, 1.26.0-2.0.pre.402, on Linux, locale zh_CN.UTF-8)

[✓] Android toolchain - develop for Android devices (Android SDK version

30.0.3)

[✓] Chrome - develop for

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值