Auto.js 线程通信 报错但不影响使用

gkn4icbw  于 2021-12-03  发布在  Java
关注(0)|答案(0)|浏览(291)

分别使用了三种线程通信,但都显示了异常,吊诡的是,不影响脚本使用.

Thread[main (Spawn-0),5]: TypeError: Cannot find function apply in object undefined. (file:///android_asset/modules/bridges.js#10)
TypeError: Cannot find function apply in object undefined.
at file:///android_asset/modules/bridges.js:10:0

代码如下
ui.getChatroomList.click(function () { var flag = threads.disposable(); threads.start(function () { var temp = core.updateChatroomList();//脚本操作 flag.setAndNotify(temp); }); flag.blockedGet(); // toastLog('flag = ' + flag); if (flag) { var selectType = DATASTORE.get('selectType'); var selectTypeData = DATASTORE.get('selectTypeData'); if (selectType && selectTypeData) { var name = selectTypeData[selectType]; app.startActivity('console'); setTimeout(function () { back(); }, 1000); showUiItem(name, selectType); } } });

暂无答案!

目前还没有任何答案,快来回答吧!

相关问题