When the Android project is compiled, the following error occurs: Caused by: java. lang. ClassNotFoundException: com. example. aaa. MainActivity.

Source: Internet
Author: User

When the Android project is compiled, the following error occurs: Caused by: java. lang. ClassNotFoundException: com. example. aaa. MainActivity.

Error Type:

04-28 06:10:15.508: E/AndroidRuntime(849): Caused by: java.lang.ClassNotFoundException: com.example.aaa.MainActivity04-28 06:10:15.508: E/AndroidRuntime(849):  at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:61)04-28 06:10:15.508: E/AndroidRuntime(849):  at java.lang.ClassLoader.loadClass(ClassLoader.java:501)04-28 06:10:15.508: E/AndroidRuntime(849):  at java.lang.ClassLoader.loadClass(ClassLoader.java:461)04-28 06:10:15.508: E/AndroidRuntime(849):  at android.app.Instrumentation.newActivity(Instrumentation.java:1053)04-28 06:10:15.508: E/AndroidRuntime(849):  at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1974)04-28 06:10:15.508: E/AndroidRuntime(849):  ... 11 more

Analysis: The ClassNotFoundException MainActivity class is not found.
During packaging, the v4 conflict causes
Solution: switch to the API version and re-compile the SDK version,Neither can clean.

You can change the SDK version at the position marked in the figure. After re-compiling, you can change it to the version you need!

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.