Android Development Bug-no Activity found to handle Intent

Source: Internet
Author: User

Android.content.ActivityNotFoundException:No Activity found to handle Intent

In Android development, the action and category are set using the implicit intent,manifest

As follows:

<ActivityAndroid:name= "Exerciseintent." Exintent2_1 ">            <Intent-filter>                <ActionAndroid:name= "1111111111111111111"/>                <categoryAndroid:name= "Android.intent.category.MY_CATEGORY"/>            </Intent-filter>        </Activity>

Force close appears every time a jump is made.

Log for 06-06 22:23:27.990:e/androidruntime (2652): Android.content.ActivityNotFoundException:No Activity found to handle Intent {act=1111111111111111111 cat=[android.intent.category.my_category] (has extras)}

After searching, we get a clue that implicit intent contains at least "Android.intent.category.DEFAULT" (corresponding to the Category_default constant). Therefore, an activity that wants to receive implicit intent must include "Android.intent.category.DEFAULT" in the intent filter.

After modification:

        <ActivityAndroid:name= "Exerciseintent." Exintent2_1 ">            <Intent-filter>                <ActionAndroid:name= "1111111111111111111"/>                <categoryAndroid:name= "Android.intent.category.DEFAULT"/>                <categoryAndroid:name= "Android.intent.category.MY_CATEGORY"/>            </Intent-filter>        </Activity>

After testing, OK.

Recorded.

Android Development Bug-no Activity found to handle Intent

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.