Mac安装配置Flutter注意事项

安装步骤见官网中文官网github地址

一. 如果你是download的release包,运行flutter doctor会报如下错误:

Error: The Flutter directory is not a clone of the GitHub project.
       The flutter tool requires Git in order to operate properly;
       to set up Flutter, run the following command:
       git clone -b beta https://github.com/flutter/flutter.git

解决方案:

  1. 在flutter目录执行git init不推荐
  2. git clone https://github.com/flutter/flutter.git 或者按官方推荐git clone -b beta https://github.com/flutter/flutter.git 使用beta分支。

二、安装中文版教程中安装iOS设备的工具时会报错:

checking pkg-config is at least version 0.9.0... yes checking for libusbmuxd >= 1.1.0... no configure: error: Package requirements (libusbmuxd >= 1.1.0) were not met:

Requested 'libusbmuxd >= 1.1.0' but version of libusbmuxd is 1.0.10

解决方案在英文版中已经提供:

 brew update
# The following two steps are a temporary workaround to https://github.com/flutter/flutter/issues/22595
 brew install --HEAD usbmuxd
 brew link usbmuxd
 brew install --HEAD libimobiledevice
 brew install ideviceinstaller ios-deploy cocoapods
 pod setup

所以还是推荐大家去看英文原版教程,更新比较及时。

三、最新的Android Studio Preview版本不支持flutter,建议使用正式版。

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值