flutter 是 Google推出并开源的移动应用开发框架,主打跨平台、高保真、高性能。开发者可以通过 Dart语言开发 App,一套代码同时运行在 iOS 和 Android平台。
在MacOS平台搭建flutter环境的过程中,把自己遇到的几个坑和填坑过程分享一下。
第一,要从官网或者github上下载flutter SDK,否则会报错。
第二,如果下载的Android Studio版本大于3.6.1,默认情况下是不会安装Android SDK Tools的,默认这个选项也是看不到的,记得将 Hide Obsolete Packages 这个选项勾选取消掉,就能看到Android SDK Tools,下载即可,然后执行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
终端:sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer
网友评论