Unable to resolve superclass
When you added Android Support library to your project in Eclipse ADT, to implement classes like FragmentActivity, ViewPager etc At times you may see this error which results in app crash due to Unable to resolve superclass,
Unable to resolve superclass of Lin/AppPath/MainActivity; (9)
05-16 14:10:11.705: W/dalvikvm(6534): Link of class 'Lin/AppPath/MainActivity;' failed
05-16 14:10:11.705: D/AndroidRuntime(6534): Shutting down VM
05-16 14:10:11.705: W/dalvikvm(6534): threadid=1: thread exiting with uncaught exception (group=0x41ba5c08)
05-16 14:10:11.705: E/AndroidRuntime(6534): FATAL EXCEPTION: main
05-16 14:10:11.705: E/AndroidRuntime(6534): Process: , PID: 6534
05-16 14:10:11.705: E/AndroidRuntime(6534): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{/.MainActivity}: java.lang.ClassNotFoundException: Didn't find class ".MainActivity" on path: DexPathList[[zip file
......
....
There may be a chance that Android Private Library, not exported while generating API file. Due to Android Private Libraries is unchecked in Order and Export tab in Java build path dialog as shown below. So, just check the Android Private Libraries and Click Ok. Clean and Build the app. Fixes the issue.
Hope it helps somebody. 🙂
You may be also interested in
- In Eclipse, how to edit commit message of local commit with EGit
- Logcat Clearing too Fast- Eclipse
- For using Korean or Special characters in eclipse editor
- Graphical Layout is blank and Eclipse reports rendering library more recent than your version of ADT plug-in
- In Eclipse, Egit Team context menu has only two options: Apply patch, Share Project
- Issues with Android SDK tools rev.23 installed from SDK manager
- Keytool error :java.io.IoException:Incorrect AVA format