I am using cocos2d for android. The CCCallFunc is not working anywhere. It is always throwing NoSuchMethodException.
The CCCallFuncN
CCCallFuncN hideFunction = CCCallFuncN.action(this,
"hidesSprite");
My method
public void hidesSprite (CCNode sprite) {
sprite.setVisible(false);
}
This code is in public class PageLayer extends CCLayer
I solved the problem by changing the parameter type to Object:
public void hidesSprite (Object sender) {
Sprite sprite = (Sprite) sender;
sprite.setVisible(false);
}