微信小程序 - Unhandled promise rejection TypeError: r.C
发表时间:2020-10-15
发布人:葵宇科技
浏览次数:305
- 微信小程序开发在使用 Canvas 进行真机调试的时候报错:
VM22:2 Unhandled promise rejection TypeError: r.Canvas is not a constructor
at n.value (eval at n.call.document (runtime.js?devtools_ignore=true:1), <anonymous>:2:1055836)
at n.value (eval at n.call.document (runtime.js?devtools_ignore=true:1), <anonymous>:2:761772)
at t (eval at n.call.document (runtime.js?devtools_ignore=true:1), <anonymous>:2:761939)
at n.value (eval at n.call.document (runtime.js?devtools_ignore=true:1), <anonymous>:2:762028)
at eval (eval at n.call.document (runtime.js?devtools_ignore=true:1), <anonymous>:2:1278758)
at new E (eval at n.call.document (runtime.js?devtools_ignore=true:1), <anonymous>:2:67059)
at Vc (eval at n.call.document (runtime.js?devtools_ignore=true:1), <anonymous>:2:1278720)
at eval (eval at n.call.document (runtime.js?devtools_ignore=true:1), <anonymous>:2:1280188)
at Array.forEach (<anonymous>)
at r (eval at n.call.document (runtime.js?devtools_ignore=true:1), <anonymous>:2:1280166)
- 原因:canvas 2d和 webgl 暂不支持真机调试,请直接使用真机预览。