• <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.    

    孩交精品xxxx视频视频| 精品国产91久久久久久久| 国产视频精品免费视频| 久久精品国产精品青草app| 国产精品臀控福利在线观看| 热综合一本伊人久久精品| 久久精品99香蕉国产| 精品久久久久久中文字幕无码| 久久久久亚洲精品男人的天堂| 久久精品国产99国产精品导航| 无码乱码观看精品久久| 亚洲日本久久久午夜精品| 免费久久精品国产片香蕉| 午夜精品久久久久久毛片| 国产亚洲精品91| 久久亚洲精品11p| 久久精品国产亚洲AV麻豆王友容| 国产精品女人呻吟在线观看| 国产精品久久久久9999| 人人妻人人澡人人爽人人精品97| 日韩成人精品日本亚洲| 久久久久久国产精品视频 | 午夜精品福利在线观看| 亚洲动漫精品无码av天堂| 国产伦精品一区二区| 精品亚洲成A人在线观看青青| 亚洲国产日韩精品| 久久精品国产免费观看三人同眠| 99亚洲精品高清一二区| 国产网红主播无码精品| 亚洲AV蜜桃永久无码精品| 国产精品入口在线看麻豆| 亚洲精品亚洲人成在线观看麻豆| 99re6在线精品免费观看| 国产精品嫩草影院线路| 久久国产免费观看精品3| 中国国产成人精品久久| 国产精品宾馆在线| 午夜国产精品久久久久| 色婷婷精品免费视频| 精品午夜国产福利观看|