Unable to resolve superclass of Activity

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. resolve superclass 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

Leave a Reply

Your email address will not be published. Required fields are marked *