- 图片加载失败
图片资源命名中存在中文会导致加载失败
- List.asMap().map()错误
List temp = ["aa", "bb", "cc"];
temp.asMap().map((k, v){
print("${k}:${v}");
});
flutter: ══╡ EXCEPTION CAUGHT BY WIDGETS LIBRARY ╞═══════════════════════════════════════════════════════════
flutter: The following NoSuchMethodError was thrown building Builder:
flutter: The getter 'key' was called on null.
flutter: Receiver: null
flutter: Tried calling: key
map不能直接map出key/value来
List temp = ["aa", "bb", "cc"];
temp.asMap().keys.map((v){
print("${v}");
});
- 不认设备,或者进程占用,无法启动程序
上次设备没有正常关闭,直接拔掉手机有可能导致进程没有关掉,flutter还在lock,插入别的手机导致无法识别
解决办法:
- 插回原来的手机运行
- 重启,删/flutter/bin/cache/lockfile