Android Project import no errors, run prompt unable to instantiate activity ComponentInfo

Source: Internet
Author: User

Import Xiaomi Clientside_android_sdk demo Oauth-openauthdemo, point Java Build Path libraries inside add External JARs, Introduce the Oauth-xiaomiopenauth.jar package.

Clean engineering, and then build project, with the run, prompt:

Unable to instantiate activity componentinfo like, java.lang.RuntimeException:Unable to instantiate activity ComponentInfo {com.xiaomi.account.openauth.demo.ui.MainActivity}: java.lang.ClassNotFoundException: Com.xiaomi.account.openauth.demo.ui.MainActivity .....

Check the package name inside the Androidmanifest.xml, it is Com.xiaomi.account.openauth.demo, and registered. Ui.mainactivity, but still error. Later, the solution was found, and it worked:

When importing the Java build path, do not import the corresponding jar package without libraries, and also remember to tick the corresponding jar package in the order and export options. I just forgot to tick the jar package inside the order and export .....

What a simple question, how painful it is to comprehend ~~~~~~

Suddenly received a notice said not to pick up the Xiaomi Social SDK, hem hem ....

Android Project import no errors, run prompt unable to instantiate activity ComponentInfo

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.