Android电子市场活动意图 - 未找到任何活动

时间:2011-10-19 12:22:43

标签: android

android文档声明我应该能够执行以下操作来启动Android市场活动。

Intent intent = new Intent(Intent.ACTION_VIEW);
intent.setData(Uri.parse("market://details?id=com.android.example"));
startActivity(intent);

然而,我收到此错误:

No activity found to handle Intent.

我是否需要在我的应用中明确创建活动?

2 个答案:

答案 0 :(得分:2)

Adil在这个问题上是正确的;你需要在模拟器上安装android marketplace应用程序,但默认情况下它没有安装。它必须像任何其他.apk安装一样手动安装。

http://blog.varunkumar.me/2010/11/how-to-install-android-market-in-google.html

答案 1 :(得分:1)

您需要使用Google API图片而不是标准Android启动您的模拟器,这些可以从SDK管理器和普通的Android SDK一起提供

它们通常标记为:“Google API by Google Inc. Android API 10”显然取决于您想要的API版本。