Implicit intent cannot find Activity:android.content.ActivityNotFoundException

Source: Internet
Author: User

Here's what I encountered:android.content.ActivityNotFoundException:No Activity found to handle Intent {act=me.waye.in Tentdemo.intent.action.WAYE_ACTION Cat=[me.waye.intentdemo.intent.category.waye_category]} This error was encountered when learning the implicit activation activity, with the book being the crazy Android handout of Li Gang, which did not mention the question, and found the answer by reading the document:
Android treats all implicit intents passed to as startActivity() if they contained at least one category: " android.intent.category.DEFAULT " (The CATEGORY_DEFAULTconstant). Therefore, activities that is willing to receive implicit intents must include " android.intent.category.DEFAULT " in their intent filters. (Filters with " android.intent.action.MAIN " and " android.intent.category.LAUNCHER " settings is the exception. They mark activities that begin new tasks and that is represented on the launcher screen. They can include " android.intent.category.DEFAULT " in the list of categories, but don ' t need to.) See Using the intent matching, later, for more on these filters.)
An activity that accepts implicit intent must contain Android.intent.category.DEFAULT, but launcher and main exceptions can be added, but not necessary.

Implicit intent cannot find Activity:android.content.ActivityNotFoundException

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.