cd ~/development
unzip ~/Downloads/flutter_macos.zip
export PUB_HOSTED_URL=https://pub.flutter-io.cn
export FLUTTER_STORAGE_BASE_URL=https://storage.flutter-io.cn
export PATH=${PATH}:/Users/duanmu/FlutterDev/flutter/bin
如果安装了zsh,需要在.zshrc配置如下命令
source ~/.bash_profile
或
source ~/.zshrc
flutter doctor
使用vs code运行Dart文件, run code报错:
/bin/sh: dart: command not found
原因是本地默认shell更改造成的,只需在.zshrc中添加如下代码,在保存就可以了
#dart
export DART_HOME=/Users/XXX/XXX/flutter/bin/cache/dart-sdk/bin
export PATH="${DART_HOME}:${PATH}"
ios真机运行时错误:
error: Building for iOS Simulator, but the linked and embedded framework 'App.framework' was built for iOS. (in target 'Runner' from project 'Runner')
解决方法:
rm -rf ios/Flutter/App.framework
参考: https://www.jianshu.com/p/6b049adfd211
https://book.flutterchina.club/chapter1/install_flutter.html
本文地址:https://blog.csdn.net/quanqinayng/article/details/107382881
如对本文有疑问, 点击进行留言回复!!
android RecyclerView checkbox复用解决
Android Q Input (1) -- InputManagerService启动
android -- ndk (stack corruption detected)
网友评论