Android 安卓-为什么向我的应用程序发送意图会导致stoare崩溃?

Android 安卓-为什么向我的应用程序发送意图会导致stoare崩溃?,android,Android,我有以下代码: Button give_review = (Button)findViewById(R.id.give_review); give_review.setOnClickListener(new Button.OnClickListener() { public void onClick(View v) { Intent intent = new Intent(Intent.ACTION_VIEW); intent.

我有以下代码:

Button give_review = (Button)findViewById(R.id.give_review);   
give_review.setOnClickListener(new Button.OnClickListener() 
{  
    public void onClick(View v) 
    {   
        Intent intent = new Intent(Intent.ACTION_VIEW);
        intent.setData(Uri.parse("market://details?id=com.problemio"));
        startActivity(intent);                
    }
});  
由于某种原因,当点击按钮时,系统崩溃

我的应用程序url是:
store/apps/details?id=com.problemio

我的类位于以下目录中:

src/com/problemio/content/MyClassNameActivity
是什么导致了这次事故?我在我的应用程序的其他部分中使用了这段代码,尽管其他类在src/com/problemio目录下一个目录中,但它仍然有效

以下是堆栈跟踪:

android.content.ActivityNotFoundException: No Activity found to handle Intent { act=android.intent.action.VIEW dat=market://details?id=com.problemio }
at android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:1512)
at android.app.Instrumentation.execStartActivity(Instrumentation.java:1384)
at android.app.Activity.startActivityForResult(Activity.java:3190)
at android.app.Activity.startActivity(Activity.java:3297)
at com.problemio.content.BusinessIdeasActivity$5.onClick(BusinessIdeasActivity.java:105)
at android.view.View.performClick(View.java:3511)
at android.view.View$PerformClick.run(View.java:14105)
at android.os.Handler.handleCallback(Handler.java:605)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4424)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
at dalvik.system.NativeStart.main(Native Method)
谢谢你的建议,
Alex

在emulator中没有市场,您发现的
活动未发现异常
如下:

05-07 22:20:46.702: E/AndroidRuntime(580): Caused by: android.content.ActivityNotFoundException: No Activity found to handle Intent { act=android.intent.action.VIEW dat=market://details?id=com.problemio }
05-07 22:20:46.702: E/AndroidRuntime(580):  at ...
05-07 22:20:46.702: E/AndroidRuntime(580):  ... 11 more

没有其他
活动
可以处理此意图。

我猜不会有logcat输出,因为模拟器中没有应用商店url…对吗?使用上述代码url工作正常。您尝试过设备吗?请上传logcat输出。我刚刚添加了堆栈跟踪。它指向第105行,这是一条具有星触觉(意图)的线。。除了异常堆栈跟踪之外,logCat对此为空。我正在实时设备中获取此信息:)您是否在您的设备上尝试了我的应用程序?