Skip to content

Flutter 开发遇到的问题

Flutter debug macos/ios 出现的警告

依赖分析警告

bash
warning: Run script build phase 'Run Script' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'Runner' from project 'Runner')
  1. 点击 Runner.xcodeproj 使用 xocde 打开
  2. 双击左侧图标, 点击主窗口 TARGETS->Runer->Build Phases
  3. 展开 Run Script, 取消勾选 Based on dependency analysis

版本问题

直接搜索 10.11(你出现警告的版本号) 进行修改即可

build && install

bash
flutter build apk
<!-- abi 打包 -->
flutter build apk --split-per-abi

icon

bash
flutter pub run icons_launcher:create

vscode debug 解决

sh
export NO_PROXY=localhost,127.0.0.1::1

ios

bash
sudo gem uninstall ffi && sudo gem install ffi -- --enable-libffi-alloc