代码写好后用android模拟器 游戏可以正常run运行
然后cocos compile -p web -m release 发布出web版本就报错:
Uncaught TypeError: Cannot read property ‘setPosition’ of undefined
a=cc.director.getWinSize();
this.bgdefault=cc.Sprite(res.BackGround_jpg);
this.bgdefault.setPosition(a.width/2,a.height/2);
setPosition这个方法怎么会出错?