windows10下安装flutter出现的问题

执行flutter doctor 后报错

C:\Users\Administrator>flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel dev, v0.10.1, on Microsoft Windows [Version 10.0.17134.345], locale zh-CN)
[√] Android toolchain - develop for Android devices (Android SDK 28.0.3)
[√] Android Studio (version 3.2)
[!] IntelliJ IDEA Ultimate Edition (version 2018.1)
X Flutter plugin not installed; this adds Flutter specific functionality.
X Dart plugin not installed; this adds Dart specific functionality.
[!] Connected device

分析:从错误中可以看出是IntelliJ IDEA 开发工具未安装flutter 和 dart 插件,因为我的电脑安装了as和idea两款开发工具,所以需要两款工具都安装插件。安装完成,重启之后再执行flutter doctor命令,出现如下错误:

C:\Users\Administrator>flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel dev, v0.10.1, on Microsoft Windows [Version 10.0.17134.345], locale zh-CN)
[!] Android toolchain - develop for Android devices (Android SDK 28.0.3)
X Android license status unknown.
[√] Android Studio (version 3.2)
[√] IntelliJ IDEA Ultimate Edition (version 2018.1)
[!] Connected device
! Doctor found issues in 2 categories.

然后再执行:flutter --android-licenses 命令:

C:\Users\Administrator>flutter doctor --android-licenses
Warning: Observed package id ‘build-tools;17.0.0’ in inconsistent location ‘D:\DevelopmentSoftwore\sdk\build-tools\android-4.2.2’ (Expected ‘D:\DevelopmentSoftwore\sdk\build-tools\17.0.0’)
Warning: Observed package id ‘system-images;android-17;default;armeabi-v7a’ in inconsistent location ‘D:\DevelopmentSoftwore\sdk\system-images\android-17\armeabi-v7a’ (Expected ‘D:\DevelopmentSoftwore\sdk\system-images\android-17\default\armeabi-v7a’)
Warning: Observed package id ‘system-images;android-17;default;mips’ in inconsistent location ‘D:\DevelopmentSoftwore\sdk\system-images\android-17\mips’ (Expected ‘D:\DevelopmentSoftwore\sdk\system-images\android-17\default\mips’)
Warning: Observed package id ‘system-images;android-17;default;x86’ in inconsistent location ‘D:\DevelopmentSoftwore\sdk\system-images\android-17\x86’ (Expected ‘D:\DevelopmentSoftwore\sdk\system-images\android-17\default\x86’)
Warning: Already observed package id ‘system-images;android-17;default;x86’ in ‘D:\DevelopmentSoftwore\sdk\system-images\android-17\default\x86’. Skipping duplicate at ‘D:\DevelopmentSoftwore\sdk\system-images\android-17\x86’
Warning: Observed package id ‘build-tools;17.0.0’ in inconsistent location ‘D:\DevelopmentSoftwore\sdk\build-tools\android-4.2.2’ (Expected ‘D:\DevelopmentSoftwore\sdk\build-tools\17.0.0’)
Warning: Observed package id ‘system-images;android-17;default;armeabi-v7a’ in inconsistent location ‘D:\DevelopmentSoftwore\sdk\system-images\android-17\armeabi-v7a’ (Expected ‘D:\DevelopmentSoftwore\sdk\system-images\android-17\default\armeabi-v7a’)
Warning: Observed package id ‘system-images;android-17;default;mips’ in inconsistent location ‘D:\DevelopmentSoftwore\sdk\system-images\android-17\mips’ (Expected ‘D:\DevelopmentSoftwore\sdk\system-images\android-17\default\mips’)
Warning: Observed package id ‘system-images;android-17;default;x86’ in inconsistent location ‘D:\DevelopmentSoftwore\sdk\system-images\android-17\x86’ (Expected ‘D:\DevelopmentSoftwore\sdk\system-images\android-17\default\x86’)
Warning: Already observed package id ‘system-images;android-17;default;x86’ in ‘D:\DevelopmentSoftwore\sdk\system-images\android-17\default\x86’. Skipping duplicate at ‘D:\DevelopmentSoftwore\sdk\system-images\android-17\x86’
Warning: File C:\Users\Administrator.android\repositories.cfg could not be loaded.
All SDK package licenses accepted.======] 100% Computing updates…
然后再执行:flutter doctor 命令:
C:\Users\Administrator>flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel dev, v0.10.1, on Microsoft Windows [Version 10.0.17134.345], locale zh-CN)
[√] Android toolchain - develop for Android devices (Android SDK 28.0.3)
[√] Android Studio (version 3.2)
[√] IntelliJ IDEA Ultimate Edition (version 2018.1)
[!] Connected device
! Doctor found issues in 1 category.

此时就已安装成功!

  • 2
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值