跟随http://www.dartlang.org/docs/tutorials/web-ui/的教程,我刚刚实现了第一个示例并尝试构建。

生成命令:

$DART_SDK/bin/dart --package-root=packages/ packages/web_ui/dwc.dart index.html

SDK版本17072的堆栈跟踪
SEVERE index.html: exception while reading file, original message:
 AsyncError: 'NoSuchMethodError : method not found: 'reversed'
Receiver: GrowableObjectArray
Arguments: []'
Stack trace:
#0      Object._noSuchMethod (dart:core-patch:1689:3)
#1      Object.noSuchMethod (dart:core-patch:1690:25)
#2      ListProxy.reversed (package:html5lib/src/list_proxy.dart:76:33)
#3      TreeBuilder.elementInScope (package:html5lib/src/treebuilder.dart:134:36)
#4      InBodyPhase.startTagHeading (package:html5lib/parser.dart:1393:28)
#5      InBodyPhase.processStartTag (package:html5lib/parser.dart:1118:31)
#6      HtmlParser.mainLoop (package:html5lib/parser.dart:333:48)
#7      HtmlParser._parse (package:html5lib/parser.dart:214:17)
#8      HtmlParser._parse (package:html5lib/parser.dart:216:9)
#9      HtmlParser.parse (package:html5lib/parser.dart:193:11)
#10     parseHtml (packages/web_ui/src/compiler.dart:35:30)
#11     Compiler._parseHtmlFile.<anonymous closure>.<anonymous closure> (packages/web_ui/src/compiler.dart:165:28)
#12     time (packages/web_ui/src/utils.dart:38:24)
#13     Compiler._time (packages/web_ui/src/compiler.dart:297:16)
#14     Compiler._parseHtmlFile.<anonymous closure> (packages/web_ui/src/compiler.dart:164:32)
#15     _ThenFuture._sendValue (dart:async:353:24)

最佳答案

17072是相当古老的版本(在Dart年代)-可以在http://www.dartlang.org/downloads.html下载的当前版本(在撰写本文时)为17657,而this change log which added List.reversed已在r17402中提交

10-04 10:41