flutter: 基本环境搭建
基本环境搭建
安装
- Android Studio
- Xcode(直接在AppStore中下载)
配置部分已经在
@jswork/ushell-module-flutter
这个包中处理了。android studio 是必须的
# 下载
wget https://storage.googleapis.com/flutter_infra_release/releases/stable/macos/flutter_macos_3.13.6-stable.zip ~/github/software/
# 解压
unzip flutter_macos_3.13.6-stable.zip
# 添加环境变量
export PATH="$PATH:$HOME/github/software/flutter/bin";
# 测试安装情况
flutter doctor
# 开发android agree licenses
flutter doctor --android-licenses
报错
Android sdkmanager not found. Update to the latest Android SDK and ensure that the cmdline-tools are installed to
resolve this.
I have just hit the same issue - my resolution was a little simpler:
Just like you, I have Android Studio installed, the key is to install Android SDK Command-line Tools, steps being:
- Open Android Studio
- Tools Menu, SDK Manager
- In the window that comes up there are inner panels, choose SDK Tools panel
- Tick Android SDK Command-line Tools
- Choose Apply button near the bottom of the window
android 环境
由于暂时不会去开发
ios
相关的东西,所以,到这里已经算配置成功了。
ios环境
同意 xcode的相关协议: sudo xcodebuild -license
一些版本比较低的 Mac 可以放弃,基本无法运行 xcode,所以,这一项是无法正常运行的。