收藏
回答

Cannot read property 'createView' of undefined

代码 https://developers.weixin.qq.com/s/mwHmSumB7hyQ

开发工具中是正常的,执行代码生成海报

但是在预览和真机测试中均报错,错误信息如下:

VM13:2 Unhandled promise rejection TypeError: Cannot read property 'createView' of undefined
    at KC._initCanvasInstance (eval at n.call.document (runtime.js?devtools_ignore=true:1), <anonymous>:2:1335059)
    at KC._init (eval at n.call.document (runtime.js?devtools_ignore=true:1), <anonymous>:2:1321389)
    at t (eval at n.call.document (runtime.js?devtools_ignore=true:1), <anonymous>:2:1321552)
    at KC._onReady (eval at n.call.document (runtime.js?devtools_ignore=true:1), <anonymous>:2:1321584)
    at eval (eval at n.call.document (runtime.js?devtools_ignore=true:1), <anonymous>:2:1819585)
    at new V (eval at n.call.document (runtime.js?devtools_ignore=true:1), <anonymous>:2:48046)
    at HU (eval at n.call.document (runtime.js?devtools_ignore=true:1), <anonymous>:2:1819562)
    at eval (eval at n.call.document (runtime.js?devtools_ignore=true:1), <anonymous>:2:1821801)
    at Array.forEach (<anonymous>)
    at eval (eval at n.call.document (runtime.js?devtools_ignore=true:1), <anonymous>:2:1821784)


回答关注问题邀请回答
收藏
登录 后发表内容