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
