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