• <ul id="cgeq2"></ul>
  • 歡迎您光臨深圳塔燈網絡科技有限公司!
    電話圖標 余先生:13699882642

    網站百科

    為您解碼網站建設的點點滴滴

    flutter環境配置詳解MAC版

    發表日期:2018-05 文章編輯:小燈 瀏覽次數:2732

    本文詳細介紹在mac下配置flutter環境的每一個步驟,通過圖文的方式使得讀者快速理解和掌握flutter的環境搭建流程。

    下載flutter

    推薦去官網下載,速度并不慢,網址:

    https://flutter.io/setup-macos/

    點擊鏈接:

    image

    筆者在寫這篇文章時候的鏈接為:

    https://storage.googleapis.com/flutter_infra/releases/beta/macos/flutter_macos_v0.3.2-beta.zip

    配置環境變量

    先把剛才下載的flutter_macos_v0.3.2-beta.zip解壓縮,筆者選擇使用的目錄是根目錄下的app文件夾

    image

    配置環境變量,這里筆者使用命令行:

    vim ~/.bash_profile 

    增加一行:

    export PATH=/app/flutter/bin:$PATH 

    保存一下,注意如果這個文件不存在,那么就新建一個。保存完畢之后運行命令:

    source ~/.bash_profile 

    這個時候應該能運行flutter命令了,我們運行命令行:

    flutter -h 

    這個時候應該能展示flutter的命令幫助:

    image

    檢查環境

    運行命令行:

    flutter doctor 
    image

    按照檢測結果的說明,如果有[!] ? 標志,表示本行檢測不通過,需要做一些設置或者安裝一些軟件。

    [!] Android toolchain - develop for Android devices (Android SDK 27.0.3)
    ! Some Android licenses not accepted.To resolve this, run: flutter doctor --android-licens

    需要運行

    flutter doctor --android-licens 
    image

    這里界面會要求輸入Y/N,一路輸入Y就行了。

    ? ideviceinstaller is not installed; this is used to discover connected iOS devices.
    To install, run:
    brew install --HEAD libimobiledevice
    brew install ideviceinstaller
    ? ios-deploy not installed. To install:
    brew install ios-deploy
    ? CocoaPods not installed.
    CocoaPods is used to retrieve the iOS platform side's plugin code that responds to your plugin usage on the Dart side.
    Without resolving iOS dependencies with CocoaPods, plugins will not work on iOS.
    For more info, see https://flutter.io/platform-plugins
    To install:
    brew install cocoapods
    pod setup

    運行命令:

    brew install --HEAD libimobiledevice brew install ideviceinstaller brew install ios-deploy brew install cocoapods pod setup 

    這個步驟有點慢...

    當然讀者看到的也許和筆者不太一致,請酌情處理。

    image

    這里出現了個錯誤,按照說明,運行:

    brew link --overwrite cocoapods 

    然后繼續運行:

    pod setup 

    如果直接運行這個命令,會相當慢,那么我們曲線解決:

    cd ~/.cocoapods/repos git clone https://github.com/CocoaPods/Specs.git 

    如果還是太慢,那么去

    鏈接:https://pan.baidu.com/s/1mQ1VvslwwccdoLRi-I0pNg密碼:lax1

    下一份,解壓縮到~/.cocoapods/repos/master目錄

    [?] Android Studio (version 3.0)
    ? Flutter plugin not installed; this adds Flutter specific functionality.
    ? Dart plugin not installed; this adds Dart specific functionality.

    打開android studio, 打開plugin

    image

    輸入flutter搜索,點擊中間的 Search in repositories

    image

    點擊install,順利的話安裝完畢之后重啟android studio

    再次運行

    flutter doctor 
    image

    注意這里有個坑,如果按照指引來做,會一直卡在這里。這里要先重裝一下python,運行下面的命令:

    brew reinstall python@2 pip install six 

    再次運行

    flutter doctor 

    至此,我們的環境就搭建完畢了,可以愉快的開發了。如果還有疑問,那么可以加入qq群854192563 我們一起探討。


    本頁內容由塔燈網絡科技有限公司通過網絡收集編輯所得,所有資料僅供用戶學習參考,本站不擁有所有權,如您認為本網頁中由涉嫌抄襲的內容,請及時與我們聯系,并提供相關證據,工作人員會在5工作日內聯系您,一經查實,本站立刻刪除侵權內容。本文鏈接:http://www.juherenli.com/18048.html
    相關APP開發
     八年  行業經驗

    多一份參考,總有益處

    聯系深圳網站公司塔燈網絡,免費獲得網站建設方案及報價

    咨詢相關問題或預約面談,可以通過以下方式與我們聯系

    業務熱線:余經理:13699882642

    Copyright ? 2013-2018 Tadeng NetWork Technology Co., LTD. All Rights Reserved.    

    亚洲精品无码高潮喷水A片软| 亚洲国产精品乱码一区二区| 久久精品中文闷骚内射| 日产国产精品亚洲系列| 亚洲精品乱码久久久久久下载 | 日韩精品一区二区三区老鸦窝| 久久免费观看国产精品88av| 国产伦精品一区二区三区免.费| 亚洲国产精品成人综合色在线婷婷| 国产精品一香蕉国产线看观看| 亚洲国产精品无码第一区二区三区 | 国产精品综合专区中文字幕免费播放| 国产精品视频第一页| 国产精品一久久香蕉国产线看观看| 国产一区二区三区精品久久呦| 日本尤物精品视频在线看| 久久福利青草精品资源站免费| 日韩精品一二三区| 国产精品嫩草影院AV| 亚洲午夜国产精品| 久久精品一区二区东京热| 国产亚洲精品高清在线| 国产精品国产三级国产av剧情| 2020亚洲男人天堂精品| 人妻熟妇乱又伦精品视频| 国产精品亚洲一区二区三区在线| 夜夜高潮夜夜爽国产伦精品| 在线观看精品国产福利片100| 久久亚洲精品国产精品婷婷| 久久精品aⅴ无码中文字字幕不卡| 日韩精品无码一区二区三区AV | 久久91精品久久91综合| 精品偷自拍另类在线观看丰满白嫩大屁股ass | 久久国产成人精品| 九九热这里只有在线精品视| 91精品国产综合久久精品| 亚洲国产精品综合久久网络| 国产91成人精品亚洲精品| 国产伦精品一区二区三区四区| 精品无码国产一区二区三区麻豆| 色综合久久精品亚洲国产|