ActivityA为单页集成模式,启动一个新的ActivityB也是单页集成模式,启动后新的ActivityB报错:java.lang.NullPointerException: Attempt to invoke interface method 'void io.dcloud.common.DHInterface.IWebview.onRootViewGlobalLayout(android.view.View)' on a null object reference,请教该如何解决呢?
NoOne
- 发布:2016-10-16 16:17
- 更新:2016-10-19 11:47
- 阅读:1122
1 个回复
骁骑
调用ACtivity
var activity = plus.android.runtimeMainActivity();
var Intent = plus.android.importClass("android.content.Intent");
var intent = new Intent(activity.getIntent());
intent.setClassName(activity, "com.HBuilder.integrate.SDK_WebApp");
activity.startActivity(intent);
要打开的新Activity必须要在Androidmanifest.xml文件中声明