Monday, July 29, 2013

AndroidRuntime: java.lang.NoClassDefFoundError

Error

-E/AndroidRuntime( 9673): java.lang.NoClassDefFoundError: your.package.class
-Unable to resolve superclass of 

-Could not find class 'your.class', referenced from method 'your.method'


I got the above error for my own classes !

Solution


My Case: i was extending android classes and using methods from API LEVEL 11 ( Android 3.0 ) and testing on API LEVEL 10 ( Android 2.3 )


I solved this issue by making special handling for API Level below 11 using this function


if(android.os.Build.VERSION.SDK_INT < 11)
{
   //handle this level

}

No comments:

Post a Comment