2.1.1无法运行官方教程示例example-cases,启动报错

用2.1.1启动了下官方示例example-cases,启动的时候报错,报错日志如下:

PS:使用chrome浏览器

boot.js:116 Uncaught TypeError: Cannot read property ‘width’ of undefined
at getEmulatedScreenSize (boot.js:116)
at showSplash (boot.js:126)
at initPreviewOptions (boot.js:172)
at boot.js:175
at boot.js:406
CCDebug.js:249 No need to specify the “type” of “cc.EditBox._N$fontColor” because cc.Color is a child class of ValueType. Just set the default value to ‘new cc.Color()’ and it will be handled properly. cc.EditBox _N$fontColor cc.Color
CCDebug.js:249 No need to specify the “type” of “cc.EditBox._N$placeholderFontColor” because cc.Color is a child class of ValueType. Just set the default value to ‘new cc.Color()’ and it will be handled properly. cc.EditBox _N$placeholderFontColor cc.Color

新建的example-cases?

不是新建的,是官方那个demo集合,从github上撸下来的

那个早就不好用了,看看代码就行,别指望运行。

你直接用creator创建吧,怕你git的时候版本不对。