flutter 入坑问题收集(更新中)

  1. 字符号不显示

    1. You need to set uses-material-design: true in pubspec.yaml for the icons to be included in the app. stackoverflow
  2. 执行更新库:packages get 命令,会卡住,一直lock状态

    1. 找到自己的flutter的路径
    2. 删除cache中的lockfile rm /Users/xxx/development/flutter/bin/cache/lockfile
Waiting for another flutter command to release the startup lock...
  1. 打开安卓模拟器提示 Broken AVD system path. Check your ANDROID_SDK_ROOT value

    原因是 ANDROID_HOMEANDROID_SDK_ROOT 配置的不对
    在Android studio找到:File/Other Settings/Default Project Structure...
    里面会有 Android sdk location, 此路径才是ANDROID_HOME的路径,将ANDROID_HOMEANDROID_SDK_ROOT更新为此目录就可以了

image.png
4. flutter使用墙内加速

原文链接 :https://flutter.dev/community/china

export PUB_HOSTED_URL=https://pub.flutter-io.cn
export FLUTTER_STORAGE_BASE_URL=https://storage.flutter-io.cn

你可能感兴趣的:(flutter 入坑问题收集(更新中))