[Resolved] 在ios真机上运行cocos2d-html5-2.2自带的HelloHTML5World 报错,

[Resolved] 在ios真机上运行cocos2d-html5-2.2自带的HelloHTML5World 报错,
0.0 0


Cocos2d: Assert failed: No shader program set for this node
Assertion failed: (getShaderProgram()), function draw, file /Users/wenke/Documents/cocos2d/cocos2d-x-2.2/cocos2dx/sprite_nodes/CCSprite.cpp, line 554.

临时的解决办法是 :
this.circle = new CircleSprite();
this.circle.setPosition(cc.p(40, size.height - 60));
this.addChild(this.circle, 2);
this.circle.schedule(this.circle.myUpdate, 1 / 60);

详情请看:http://blog.csdn.net/wk3368/article/details/14125173 step4


Oh, yes.

Because it has not been supported to override native function in Javascript binding, for example Sprite’s draw and visit function, so it causes this problem.

We’ll remove CircleSprite from HelloHTML5World soon.

Thanks for your noticing.


got it!
thanks for your reply!