|
[插件开发]
模块回调错误,提示 org.json.JSONException
[复制链接]
本帖最后由 初学请指教 于 2020-6-28 18:38 编辑
rets.put("progress", run_progress); 这里提示错误 Unhandled exception: org.json.JSONException
这句放在run() 里提示错误,百度也不知道原因,帮忙看看啊,谢谢啊
final JSONObject rets = new JSONObject();
try {
rets.put("progress", run_progress);
final Handler handler = new Handler();
Runnable runnable = new Runnable() {
@Override
public void run() {
rets.put("progress", run_progress); 这里提示错误 Unhandled exception: org.json.JSONException
moduleContext.success(rets, false);
handler.postDelayed(this,1000);
}
};
handler.post(runnable);
} catch (JSONException e) {
e.printStackTrace();
}
|
|