mac 安裝flutter遇到的問(wèn)題

在安裝flutter時(shí),前面所有流程都按照官方的走,但是在執(zhí)行 flutter doctor時(shí),出現(xiàn)2個(gè)錯(cuò)誤

1、提示需要安裝cocoapods?

2、提示需要安裝 android studio

安裝cocoapods是通過(guò)brew 來(lái)安裝的

但是安裝brew 時(shí),按照官方給定的shell腳本是不行的,提示:

Failed to connect to raw.githubusercontent.com port 443: Connection refused

只有通過(guò)下載安裝,下載安裝 brew后,執(zhí)行

sudo brew install cocoapods 時(shí),又遇到:

··· Running Homebrew as root is extremely dangerous and no longer supported.

As Homebrew does not drop privileges on installation you would be giving all

build scripts full access to your system. ···

這個(gè)錯(cuò)誤,找了半天,沒(méi)解決。

最后直接使用 brew install cocoapods 時(shí)正確了。

如果使用 brew install cocoapods如果也不行,可以先使用:

brew doctor

然后,再執(zhí)行:brew install cocoapods

正常就可以安裝成功了,安裝成功后,安裝android studio

安裝成功后,需要在preferences -> System setting -> android sdk -> skd tools -> 勾選 commad too line?


?著作權(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),簡(jiǎn)書(shū)系信息發(fā)布平臺(tái),僅提供信息存儲(chǔ)服務(wù)。

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

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