活动没有找到处理的意图 [英] activity not found to handle intent

查看:129
本文介绍了活动没有找到处理的意图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个关于我的意图的一个问题。看来,当我选择的意图我的应用程序崩溃。我发现的错误code线因堆栈跟踪。但我无法找到任何不妥的地方。希望有人能帮助我与此有关。

这是java code符合121:
startActivity(新的意向书(Intent.ACTION_INSERT,getIntent()的getData()));

这是堆栈跟踪:

  11-24 16:09:24.634:ERROR / AndroidRuntime(222):未捕获的处理程序:螺纹主力退出,由于未捕获的异常
11-24 16:09:24.834:ERROR / AndroidRuntime(222):android.content.ActivityNotFoundException:无活动处理意向{行为= android.intent.action.INSERT DAT =内容://joel.google.provider。 TemplatePad /模板}
11-24 16:09:24.834:ERROR / AndroidRuntime(222):在android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:1408)
11-24 16:09:24.834:ERROR / AndroidRuntime(222):在android.app.Instrumentation.execStartActivity(Instrumentation.java:1378)
11-24 16:09:24.834:ERROR / AndroidRuntime(222):在android.app.Activity.startActivityForResult(Activity.java:2749)
11-24 16:09:24.834:ERROR / AndroidRuntime(222):在android.app.Activity.startActivity(Activity.java:2855)
11-24 16:09:24.834:ERROR / AndroidRuntime(222):在joel.AndroidGroupSMS.TemplatesList.onOptionsItemSelected(TemplatesList.java:121)
11-24 16:09:24.834:ERROR / AndroidRuntime(222):在android.app.Activity.onMenuItemSelected(Activity.java:2170)
11-24 16:09:24.834:ERROR / AndroidRuntime(222):在com.android.internal.policy.impl.PhoneWindow.onMenuItemSelected(PhoneWindow.java:730)
11-24 16:09:24.834:ERROR / AndroidRuntime(222):在com.android.internal.view.menu.MenuItemImpl.invoke(MenuItemImpl.java:139)
11-24 16:09:24.834:ERROR / AndroidRuntime(222):在com.android.internal.view.menu.MenuBuilder.performItemAction(MenuBuilder.java:855)
11-24 16:09:24.834:ERROR / AndroidRuntime(222):在com.android.internal.view.menu.IconMenuView.invokeItem(IconMenuView.java:525)
11-24 16:09:24.834:ERROR / AndroidRuntime(222):在com.android.internal.view.menu.IconMenuItemView.performClick(IconMenuItemView.java:122)
11-24 16:09:24.834:ERROR / AndroidRuntime(222):在android.view.View.onTouchEvent(View.java:4179)
11-24 16:09:24.834:ERROR / AndroidRuntime(222):在android.widget.TextView.onTouchEvent(TextView.java:6541)
11-24 16:09:24.834:ERROR / AndroidRuntime(222):在android.view.View.dispatchTouchEvent(View.java:3709)
11-24 16:09:24.834:ERROR / AndroidRuntime(222):在android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:884)
11-24 16:09:24.834:ERROR / AndroidRuntime(222):在android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:884)
11-24 16:09:24.834:ERROR / AndroidRuntime(222):在com.android.internal.policy.impl.PhoneWindow $ DecorView.dispatchTouchEvent(PhoneWindow.java:1643)
11-24 16:09:24.834:ERROR / AndroidRuntime(222):在android.view.ViewRoot.handleMessage(ViewRoot.java:1691)
11-24 16:09:24.834:ERROR / AndroidRuntime(222):在android.os.Handler.dispatchMessage(Handler.java:99)
11-24 16:09:24.834:ERROR / AndroidRuntime(222):在android.os.Looper.loop(Looper.java:123)
11-24 16:09:24.834:ERROR / AndroidRuntime(222):在android.app.ActivityThread.main(ActivityThread.java:4363)
11-24 16:09:24.834:ERROR / AndroidRuntime(222):在java.lang.reflect.Method.invokeNative(本机方法)
11-24 16:09:24.834:ERROR / AndroidRuntime(222):在java.lang.reflect.Method.invoke(Method.java:521)
11-24 16:09:24.834:ERROR / AndroidRuntime(222):在com.android.internal.os.ZygoteInit $ MethodAndArgsCaller.run(ZygoteInit.java:860)
11-24 16:09:24.834:ERROR / AndroidRuntime(222):在com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)
11-24 16:09:24.834:ERROR / AndroidRuntime(222):在dalvik.system.NativeStart.main(本机方法)
 

解决方案

你能告诉我们你希望以配合您的有意图是什么?该部分:

行为= android.intent.action.INSERT DAT =内容://joel.google.provider.TemplatePad/templates

意味着你需要与href="http://developer.android.com/guide/topics/intents/intents-filters.html#ifs" rel="nofollow">意图过滤器的设置来处理插入操作隐含的要求对内容://joel.google.provider.TemplatePad -schemed的URI

I have a problem regarding my intent. It seems that my app crashes when i select the intent. I found the line of error code due to the stack trace. But i couldn't find anything wrong with it. Hope anyone can help me with this.

This is the java code in line 121:
startActivity(new Intent(Intent.ACTION_INSERT, getIntent().getData()));

This is the stack trace:

11-24 16:09:24.634: ERROR/AndroidRuntime(222): Uncaught handler: thread main exiting due to uncaught exception
11-24 16:09:24.834: ERROR/AndroidRuntime(222): android.content.ActivityNotFoundException: No Activity found to handle Intent { act=android.intent.action.INSERT dat=content://joel.google.provider.TemplatePad/templates }
11-24 16:09:24.834: ERROR/AndroidRuntime(222):     at android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:1408)
11-24 16:09:24.834: ERROR/AndroidRuntime(222):     at android.app.Instrumentation.execStartActivity(Instrumentation.java:1378)
11-24 16:09:24.834: ERROR/AndroidRuntime(222):     at android.app.Activity.startActivityForResult(Activity.java:2749)
11-24 16:09:24.834: ERROR/AndroidRuntime(222):     at android.app.Activity.startActivity(Activity.java:2855)
11-24 16:09:24.834: ERROR/AndroidRuntime(222):     at joel.AndroidGroupSMS.TemplatesList.onOptionsItemSelected(TemplatesList.java:121)
11-24 16:09:24.834: ERROR/AndroidRuntime(222):     at android.app.Activity.onMenuItemSelected(Activity.java:2170)
11-24 16:09:24.834: ERROR/AndroidRuntime(222):     at com.android.internal.policy.impl.PhoneWindow.onMenuItemSelected(PhoneWindow.java:730)
11-24 16:09:24.834: ERROR/AndroidRuntime(222):     at com.android.internal.view.menu.MenuItemImpl.invoke(MenuItemImpl.java:139)
11-24 16:09:24.834: ERROR/AndroidRuntime(222):     at com.android.internal.view.menu.MenuBuilder.performItemAction(MenuBuilder.java:855)
11-24 16:09:24.834: ERROR/AndroidRuntime(222):     at com.android.internal.view.menu.IconMenuView.invokeItem(IconMenuView.java:525)
11-24 16:09:24.834: ERROR/AndroidRuntime(222):     at com.android.internal.view.menu.IconMenuItemView.performClick(IconMenuItemView.java:122)
11-24 16:09:24.834: ERROR/AndroidRuntime(222):     at android.view.View.onTouchEvent(View.java:4179)
11-24 16:09:24.834: ERROR/AndroidRuntime(222):     at android.widget.TextView.onTouchEvent(TextView.java:6541)
11-24 16:09:24.834: ERROR/AndroidRuntime(222):     at android.view.View.dispatchTouchEvent(View.java:3709)
11-24 16:09:24.834: ERROR/AndroidRuntime(222):     at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:884)
11-24 16:09:24.834: ERROR/AndroidRuntime(222):     at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:884)
11-24 16:09:24.834: ERROR/AndroidRuntime(222):     at com.android.internal.policy.impl.PhoneWindow$DecorView.dispatchTouchEvent(PhoneWindow.java:1643)
11-24 16:09:24.834: ERROR/AndroidRuntime(222):     at android.view.ViewRoot.handleMessage(ViewRoot.java:1691)
11-24 16:09:24.834: ERROR/AndroidRuntime(222):     at android.os.Handler.dispatchMessage(Handler.java:99)
11-24 16:09:24.834: ERROR/AndroidRuntime(222):     at android.os.Looper.loop(Looper.java:123)
11-24 16:09:24.834: ERROR/AndroidRuntime(222):     at android.app.ActivityThread.main(ActivityThread.java:4363)
11-24 16:09:24.834: ERROR/AndroidRuntime(222):     at java.lang.reflect.Method.invokeNative(Native Method)
11-24 16:09:24.834: ERROR/AndroidRuntime(222):     at java.lang.reflect.Method.invoke(Method.java:521)
11-24 16:09:24.834: ERROR/AndroidRuntime(222):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:860)
11-24 16:09:24.834: ERROR/AndroidRuntime(222):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)
11-24 16:09:24.834: ERROR/AndroidRuntime(222):     at dalvik.system.NativeStart.main(Native Method)

解决方案

Can you show us the intent filter you're hoping to match with your implicit intent there? This part:

act=android.intent.action.INSERT dat=content://joel.google.provider.TemplatePad/templates

means you need to have an activity with an intent filter set up to handle implicit requests for the INSERT action on content://joel.google.provider.TemplatePad-schemed URIs.

这篇关于活动没有找到处理的意图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆