Mac 如何配置 flutter环境
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
如何解决这些问题呢:我下载了一个Android studio
按照brew时出现的问题:
==> 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关闭了就可以了。原来如此,我看网上获取权限的方法不行。
Xcode中如何引进flutter
我是参照了网络上的文章 https://www.jianshu.com/p/fcc5c6138a23
1. 在命令行输入,需要和项目在同级目录下
flutter create -t module my_flutter(这个名字自己取)
然后就会出现