2
Intent intent = new Intent(this, com.xxx.MapRouteActivity.class);
this.ctx.startActivity(intent);

这不起作用Phonegap,我调用了插件执行方法,但它是强制关闭应用程序,请任何人都可以告诉如何调用自定义意图以及从哪里调用这个。

我在 logcat 中遇到了这样的错误

E/AndroidRuntime(870): FATAL EXCEPTION: Thread-22
08-30 15:15:01.463: E/AndroidRuntime(870): java.lang.NoClassDefFoundError: com.camden.intenttest.MapRouteActivity
4

1 回答 1

0

尝试使用而不是:

Intent intent = new Intent(this, com.xxx.MapRouteActivity.class);
this.ctx.startActivity(intent);

这个:

Intent intent = new Intent(NameOfTheCurrentActivity.this, com.xxx.MapRouteActivity.class);
startActivity(intent);

喜欢:

Intent in = new Intent(FirstActivity.this, SecondActivity.class);
startActivity(in);
于 2012-08-30T11:35:41.353 回答