国产亚洲欧美人成在线,免费视频爱爱太爽了无码,日本免费一区二区三区高清视频 ,国产真实伦对白精彩视频

歡迎您光臨深圳塔燈網(wǎng)絡(luò)科技有限公司!
電話圖標(biāo) 余先生:13699882642

網(wǎng)站百科

為您解碼網(wǎng)站建設(shè)的點(diǎn)點(diǎn)滴滴

flutter環(huán)境配置詳解MAC版

發(fā)表日期:2018-05 文章編輯:小燈 瀏覽次數(shù):2801

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

下載flutter

推薦去官網(wǎng)下載,速度并不慢,網(wǎng)址:

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

點(diǎn)擊鏈接:

image

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

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

配置環(huán)境變量

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

image

配置環(huán)境變量,這里筆者使用命令行:

vim ~/.bash_profile 

增加一行:

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

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

source ~/.bash_profile 

這個時候應(yīng)該能運(yùn)行flutter命令了,我們運(yùn)行命令行:

flutter -h 

這個時候應(yīng)該能展示flutter的命令幫助:

image

檢查環(huán)境

運(yùn)行命令行:

flutter doctor 
image

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

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

需要運(yùn)行

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

運(yùn)行命令:

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

這個步驟有點(diǎn)慢...

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

image

這里出現(xiàn)了個錯誤,按照說明,運(yùn)行:

brew link --overwrite cocoapods 

然后繼續(xù)運(yùn)行:

pod setup 

如果直接運(yùn)行這個命令,會相當(dāng)慢,那么我們曲線解決:

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搜索,點(diǎn)擊中間的 Search in repositories

image

點(diǎn)擊install,順利的話安裝完畢之后重啟android studio

再次運(yùn)行

flutter doctor 
image

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

brew reinstall python@2 pip install six 

再次運(yùn)行

flutter doctor 

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


本頁內(nèi)容由塔燈網(wǎng)絡(luò)科技有限公司通過網(wǎng)絡(luò)收集編輯所得,所有資料僅供用戶學(xué)習(xí)參考,本站不擁有所有權(quán),如您認(rèn)為本網(wǎng)頁中由涉嫌抄襲的內(nèi)容,請及時與我們聯(lián)系,并提供相關(guān)證據(jù),工作人員會在5工作日內(nèi)聯(lián)系您,一經(jīng)查實(shí),本站立刻刪除侵權(quán)內(nèi)容。本文鏈接:http://jstctz.cn/18048.html
相關(guān)APP開發(fā)