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!