Mac安裝配置Flutter注意事項(xiàng)

安裝步驟見官網(wǎng),中文官網(wǎng)github地址

一. 如果你是download的release包,運(yùn)行flutter doctor會(huì)報(bào)如下錯(cuò)誤:

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目錄執(zhí)行git init。不推薦
  2. git clone https://github.com/flutter/flutter.git 或者按官方推薦git clone -b beta https://github.com/flutter/flutter.git 使用beta分支。

二、安裝中文版教程中安裝iOS設(shè)備的工具時(shí)會(huì)報(bào)錯(cuò):

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

解決方案在英文版中已經(jīng)提供:

 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

所以還是推薦大家去看英文原版教程,更新比較及時(shí)。

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

最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請(qǐng)聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時(shí)請(qǐng)結(jié)合常識(shí)與多方信息審慎甄別。
平臺(tái)聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點(diǎn),簡書系信息發(fā)布平臺(tái),僅提供信息存儲(chǔ)服務(wù)。

相關(guān)閱讀更多精彩內(nèi)容

友情鏈接更多精彩內(nèi)容