Mac flutter環(huán)境配置以及Xcode中引入flutter

Mac 如何配置 flutter環(huán)境


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

[?] Flutter (Channel stable, v1.0.0, on Mac OS X 10.14.2 18C54, locale

? ? zh-Hans-CN)

[!] Android toolchain - develop for Android devices (Android SDK 28.0.3)

? ? ?Android licenses not accepted.? To resolve this, run: flutter doctor

? ? ? --android-licenses

[?] 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

? ? ? 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 with Brew:

? ? ? ? brew install ios-deploy

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

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

[?] Android Studio (version 3.2)

? ? ? Flutter plugin not installed; this adds Flutter specific functionality.

? ? ? Dart plugin not installed; this adds Dart specific functionality.

[!] IntelliJ IDEA Ultimate Edition (version 2016.2.4)

? ? ? Flutter plugin not installed; this adds Flutter specific functionality.

? ? ? Dart plugin not installed; this adds Dart specific functionality.

? ? ? This install is older than the minimum recommended version of 2017.1.0.

[!] Connected device

? ? ! No devices available

如何解決這些問題呢:我下載了一個(gè)Android studio ?


按照brew時(shí)出現(xiàn)的問題:

==> Downloading and installing Homebrew...

fatal: cannot copy '/Library/Developer/CommandLineTools/usr/share/git-core/templates/hooks/pre-receive.sample' to '/usr/local/Homebrew/.git/hooks/pre-receive.sample': Permission denied

Failed during: git init -q

我把所有的xcode關(guān)閉了就可以了。原來如此,我看網(wǎng)上獲取權(quán)限的方法不行。

Xcode中如何引進(jìn)flutter

我是參照了網(wǎng)絡(luò)上的文章?http://www.itdecent.cn/p/fcc5c6138a23

1. ?在命令行輸入,需要和項(xiàng)目在同級目錄下

flutter create -t module ?my_flutter(這個(gè)名字自己取)

然后就會出現(xiàn)


2.接下來修改pod文件

platform :ios,'9.0'

inhibit_all_warnings!

target 'flutterTest' do

end

//這個(gè)路徑要配置好,要不然會出現(xiàn),找不到鏡像 disk image.

//這個(gè)路徑就是我們剛剛通過命令行生成的文件路徑

flutter_application_path ='../flutter_module'

eval(File.read(File.join(flutter_application_path,'.ios','Flutter','podhelper.rb')), binding)


3.接下來你配置這個(gè)的時(shí)候記得勾選 Run script only when installing

要不然xcode10編譯會出現(xiàn) ?Command PhaseScriptExecution failed with a nonzero exit code

?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時(shí)請結(jié)合常識與多方信息審慎甄別。
平臺聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點(diǎn),簡書系信息發(fā)布平臺,僅提供信息存儲服務(wù)。

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

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