xzh
xzh
  • 发布:2022-11-14 23:48
  • 更新:2022-11-14 23:48
  • 阅读:372

#插件讨论# 【 HelloUTS - DCloud移动团队 】uts-nativepage插件跳转原生页面异常

分类:uni-app
关联插件: hello-uts

uts-nativepage插件跳转原生页面异常,报错信息Error: targetMethod error::java.lang.RuntimeException: Can't create handler inside thread Thread[DefaultDispatcher-worker-1,5,main] that has not called Looper.prepare()

我改成下面的方式就可以跳转了

let intent = new Intent();  
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);  
let componentName = new ComponentName("APP包名","uts.sdk.modules.utsNativepage.DemoActivity")  
intent.setComponent(componentName);  
getUniActivity()!.startActivity(intent);
2022-11-14 23:48 负责人:无 分享
已邀请:

该问题目前已经被锁定, 无法添加新回复