js与android交互,出现app闪退,代码如下,不知道我哪里写的不对
js与android交互,js主动调用java,java代码处理完事件后调用js,当js回调函数里有对cocosui处理时,app闪退
代码如下,是否代码写得不对,求指教。
public static void javaFunc(final String path,final String content){
appAct.runOnUiThread(new Runnable() {
@Override
public void run() {
// TODO Auto-generated method stub
appAct.runOnGLThread(new Runnable() {
@Override
public void run() {
// TODO Auto-generated method stub
Cocos2dxJavascriptJavaBridge.evalString("callback()");
}
});
}
});
}
js回调的代码:
this.image_player_1.setVisible(false);
this.image_qrcode.loadTexture(“image.png”);
var sp=cc.Sprite.create(“image.png”);
sp.setPosition(200,200);
this.ui.addChild(sp);
报错
Fatal signal 11 (SIGSEGV) at 0x0000002c (code=1), thread 32203 (Thread-8351)