I don\'t know what to do about the following errors, I\'ve searched the web but not found anything:
java.lang.ClassNotFoundException: Didn\'t find class \"an
did u create fragments? ok if you create fragments with classes and after that you have to create a class to call those fragments. and if you use switch this cane be like this
`public Fragment getItem(int i) {
// you have create a switch to get positions using i.
switch (i) {
case 0:
ChatsFragment chatsFragment = new ChatsFragment();
return chatsFragment;
case 1:
GroupsFragment groupsFragment = new GroupsFragment();
return groupsFragment;
case 2:
ContactsFragment contactsFragment = new ContactsFragment();
return contactsFragment;
default:
return null;
}
}
@Override
public int getCount() {
return 3;//error can be happen if u use default 0, use fragment counts in here.
}`
in this case you can see 3 cases in switch and the public int getCount() the return value should be 3 not default value 0.
See your error must be close to this one. i got same kind of error and i solved it.