Good day.
For some reason, if my class inherits a class that is defined in a JAR file, ClassLoader throws an exception that it cannot find the class. However, if you do not inherit the class, then everything works.
I copied the android-support-v4.jar problem library from android-sdk to $ (PROJECT_PATH) / jars , then connected it in the project as seen in the picture
However, at start, the NotClassFoundError exception is thrown, and before that a message is written to the log:
> > 04-16 23:09:32.131: W/dalvikvm(1571): > Unable to resolve superclass of > Lbt/nativeclient/TorrentAdapter; (8) > > 04-16 23:09:32.171: W/dalvikvm(1571): > Link of class > 'Lbt/nativeclient/TorrentAdapter;' > failed
Actually my code that inherits the PagerAdapter class from the library:
package bt.nativeclient; import android.support.v4.view.PagerAdapter; import android.view.View; public class TorrentAdapter extends PagerAdapter { public TorrentAdapter() { } @Override public int getCount() { // TODO Auto-generated method stub return 0; } @Override public boolean isViewFromObject(View arg0, Object arg1) { // TODO Auto-generated method stub return false; } }
I suspect that I did not take into account any small detail when working with eclipse. Can anybody help me with this problem, maybe somewhere I need to add ways? Thank.