flutter报错信息汇总

2019-05-14  本文已影响0人  遥远不是北_

一: 报错信息

项目以前运行正常,突然就编译报错了,代码没有改过。

Compiler message: org-dartlang-debug:synthetic_debug_expression:1:1: Error: Method not found: 'toStringDeep'. toStringDeep()

解决方法:

google了一下,发现是编译问题。只需要在命令行中使用flutter clean就可以了。
这样会删除build目录,重新运行时会再次生成。

$ flutter clean

: 报错信息

1.  ══╡ EXCEPTION CAUGHT BY WIDGETS LIBRARY ╞═══════════════════════════════════════════════════════════
2.  flutter: The following assertion was thrown building DataTable-[GlobalKey#f07f9](dirty, dependencies:
3.  flutter: [_InheritedTheme, _LocalizationsScope-[GlobalKey#d7ab9]]):
4.  flutter: Two or more TableRow children of this Table had the same key.
5.  flutter: All the keyed TableRow children of a Table must have different Keys.

报错原因**: **

实现DataTableSource数据源方法时漏掉了index:index

Pasted Graphic 1.jpg

解决方法**: **

增加**index:index**

三: 报错信息

Pasted Graphicdd1.jpg
上一篇下一篇

猜你喜欢

热点阅读