Flutter安裝的一些注意事項

指令 :flutter doctor 提示未安裝的按照提示安裝,如果沒有brew先安裝brew.

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

[?]Flutter(Channel stable,v1.5.4-hotfix.2,on Mac OS X 10.14.5 18F132,locale

? ? zh-Hans-CN)

[?]Android toolchain - develop for Android devices

? ? ? Unable to locate Android SDK.

? ? ? Install Android Studio from:

? ? ? https://developer.android.com/studio/index.html

? ? ? On first launch it will assist you in installing the Android SDK

? ? ? components.

? ? ? (or visit https://flutter.dev/setup/#android-setup for detailed

? ? ? instructions).

? ? ? If the Android SDK has been installed to a custom location, set

? ? ? ANDROID_HOME to that location.

? ? ? You may also want to add it to your PATH environment variable.

[!]iOS toolchain - develop for iOS devices(Xcode 10.2.1)

? ? ? libimobiledevice and ideviceinstaller are not installed. To install with

? ? ? Brew, run:

? ? ? ? brew update

? ? ? ? brew install --HEAD usbmuxd

? ? ? ? brew link usbmuxd

? ? ? ? brew install --HEAD libimobiledevice

? ? ? ? brew install ideviceinstaller

? ? ? ios-deploy not installed. To install:

? ? ? ? brew install ios-deploy

? ? ? Brew can be used to install tools for iOS device development.

? ? ? Download brew at https://brew.sh/.

[!]Android Studio(not installed)

[!]Connected device

? ? ! No devices available

更新環(huán)境變量的時候?

在修改完.bash_profile之后要讓.bash_profile生效的命令是:source .bash_profile;

不然會出現(xiàn):flutter: command not found

.bash_profile修改內(nèi)容為:

exportPUB_HOSTED_URL=https://pub.flutter-io.cn //國內(nèi)用戶需要設置exportFLUTTER_STORAGE_BASE_URL=https://storage.flutter-io.cn //國內(nèi)用戶需要設置exportPATH=PATH_TO_FLUTTER_GIT_DIRECTORY/flutter/bin:$PATH

注意路徑也要正確,PATH_TO_FLUTTER_GIT_DIRECTORY要替換成你自己解壓以后的flutter文件目錄所在的路徑,例如:export PATH=/Users/lixiwei/Desktop/flutter/flutter/bin:$PATH

-----------------------------------------------------------

新問題

bogon:flutter lixiwei$ flutter doctor

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

[?] Flutter (Channel stable, v1.5.4-hotfix.2, on Mac OS X 10.14.5 18F132, locale

? ? zh-Hans-CN)

[?] Android toolchain - develop for Android devices

? ? ? Unable to locate Android SDK.

? ? ? Install Android Studio from:

? ? ? https://developer.android.com/studio/index.html

? ? ? On first launch it will assist you in installing the Android SDK

? ? ? components.

? ? ? (or visit https://flutter.dev/setup/#android-setup for detailed

? ? ? instructions).

? ? ? If the Android SDK has been installed to a custom location, set

? ? ? ANDROID_HOME to that location.

? ? ? You may also want to add it to your PATH environment variable.

[!] iOS toolchain - develop for iOS devices

? ? ? Xcode installation is incomplete; a full installation is necessary for iOS

? ? ? development.

? ? ? Download at: https://developer.apple.com/xcode/download/

? ? ? Or install Xcode via the App Store.

? ? ? Once installed, run:

? ? ? ? sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer

[!] Android Studio (not installed)

[?] Connected device (1 available)


我的xcode是app store直接安裝的,但是不知道為啥會提示這個,我確認不需要再去下載或者app store重裝,所以直接執(zhí)行sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer ,問題解決

最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
  • 序言:七十年代末,一起剝皮案震驚了整個濱河市,隨后出現(xiàn)的幾起案子,更是在濱河造成了極大的恐慌闲坎,老刑警劉巖杆怕,帶你破解...
    沈念sama閱讀 219,589評論 6 508
  • 序言:濱河連續(xù)發(fā)生了三起死亡事件展融,死亡現(xiàn)場離奇詭異疆柔,居然都是意外死亡,警方通過查閱死者的電腦和手機牵辣,發(fā)現(xiàn)死者居然都...
    沈念sama閱讀 93,615評論 3 396
  • 文/潘曉璐 我一進店門,熙熙樓的掌柜王于貴愁眉苦臉地迎上來奴饮,“玉大人服猪,你說我怎么就攤上這事供填。” “怎么了罢猪?”我有些...
    開封第一講書人閱讀 165,933評論 0 356
  • 文/不壞的土叔 我叫張陵近她,是天一觀的道長。 經(jīng)常有香客問我膳帕,道長粘捎,這世上最難降的妖魔是什么? 我笑而不...
    開封第一講書人閱讀 58,976評論 1 295
  • 正文 為了忘掉前任危彩,我火速辦了婚禮攒磨,結(jié)果婚禮上,老公的妹妹穿的比我還像新娘汤徽。我一直安慰自己娩缰,他們只是感情好,可當我...
    茶點故事閱讀 67,999評論 6 393
  • 文/花漫 我一把揭開白布谒府。 她就那樣靜靜地躺著拼坎,像睡著了一般。 火紅的嫁衣襯著肌膚如雪完疫。 梳的紋絲不亂的頭發(fā)上泰鸡,一...
    開封第一講書人閱讀 51,775評論 1 307
  • 那天,我揣著相機與錄音壳鹤,去河邊找鬼盛龄。 笑死,一個胖子當著我的面吹牛芳誓,可吹牛的內(nèi)容都是我干的余舶。 我是一名探鬼主播,決...
    沈念sama閱讀 40,474評論 3 420
  • 文/蒼蘭香墨 我猛地睜開眼锹淌,長吁一口氣:“原來是場噩夢啊……” “哼匿值!你這毒婦竟也來了?” 一聲冷哼從身側(cè)響起葛圃,我...
    開封第一講書人閱讀 39,359評論 0 276
  • 序言:老撾萬榮一對情侶失蹤千扔,失蹤者是張志新(化名)和其女友劉穎,沒想到半個月后库正,有當?shù)厝嗽跇淞掷锇l(fā)現(xiàn)了一具尸體曲楚,經(jīng)...
    沈念sama閱讀 45,854評論 1 317
  • 正文 獨居荒郊野嶺守林人離奇死亡,尸身上長有42處帶血的膿包…… 初始之章·張勛 以下內(nèi)容為張勛視角 年9月15日...
    茶點故事閱讀 38,007評論 3 338
  • 正文 我和宋清朗相戀三年褥符,在試婚紗的時候發(fā)現(xiàn)自己被綠了龙誊。 大學時的朋友給我發(fā)了我未婚夫和他白月光在一起吃飯的照片。...
    茶點故事閱讀 40,146評論 1 351
  • 序言:一個原本活蹦亂跳的男人離奇死亡喷楣,死狀恐怖趟大,靈堂內(nèi)的尸體忽然破棺而出鹤树,到底是詐尸還是另有隱情,我是刑警寧澤逊朽,帶...
    沈念sama閱讀 35,826評論 5 346
  • 正文 年R本政府宣布罕伯,位于F島的核電站,受9級特大地震影響叽讳,放射性物質(zhì)發(fā)生泄漏追他。R本人自食惡果不足惜,卻給世界環(huán)境...
    茶點故事閱讀 41,484評論 3 331
  • 文/蒙蒙 一岛蚤、第九天 我趴在偏房一處隱蔽的房頂上張望邑狸。 院中可真熱鬧,春花似錦涤妒、人聲如沸单雾。這莊子的主人今日做“春日...
    開封第一講書人閱讀 32,029評論 0 22
  • 文/蒼蘭香墨 我抬頭看了看天上的太陽硅堆。三九已至,卻和暖如春犁苏,著一層夾襖步出監(jiān)牢的瞬間硬萍,已是汗流浹背扩所。 一陣腳步聲響...
    開封第一講書人閱讀 33,153評論 1 272
  • 我被黑心中介騙來泰國打工围详, 沒想到剛下飛機就差點兒被人妖公主榨干…… 1. 我叫王不留,地道東北人祖屏。 一個月前我還...
    沈念sama閱讀 48,420評論 3 373
  • 正文 我出身青樓助赞,卻偏偏與公主長得像,于是被迫代替她去往敵國和親袁勺。 傳聞我的和親對象是個殘疾皇子雹食,可洞房花燭夜當晚...
    茶點故事閱讀 45,107評論 2 356