【发布时间】:2014-06-14 04:18:43
【问题描述】:
我有一个带有 2 个选项的菜单充气机,分别是 About 和 Rate。关于工作正常,单击速率时,它会强制关闭。
case R.id.About:
Intent i = new Intent(this, About.class);
startActivity(i);
break;
case R.id.Rate:
Intent marketIntent = new Intent(Intent.ACTION_VIEW,
Uri.parse("market://details?
id="+"com.androidsleepmachine.gamble"));
startActivity(marketIntent);
}
以及清单代码
<activity android:name="com.androidsleepmachine.gamble.About"/>
<activity android:name="com.androidsleepmachine.gamble.Rate" />
和 Logcat
06-13 23:59:30.294: E/AndroidRuntime(1576): FATAL EXCEPTION: main
06-13 23:59:30.294: E/AndroidRuntime(1576): android.content.ActivityNotFoundException:
No Activity found to handle Intent { act=android.intent.action.VIEW
dat=market://details?id=com.androidsleepmachine.gamble }
我确信这是我忽略的一些简单的事情,但它让我发疯了。同样,About 工作得很好,Rate 会导致强制关闭,而不是将市场 URL 加载到我的应用程序,以便用户对其进行评分。
【问题讨论】:
-
这是在模拟器还是设备上?
标签: android forceclose rate