Skip to content Skip to sidebar Skip to footer

Fragmentpageradapter - Unable To Resolve Superclass

I`m trying to use FragmentPagerAdapter but when trying to run it- there is an error: 02-22 22:48:53.328: W/dalvikvm(830): Unable to resolve superclass of Linfo/androidhive/tabss

Solution 1:

You are using the FragmentStatePagerAdapter from v13 instead of v4. Thats the problem. In version 13 the FragmentManager that is used is the one on android 3.5 and higher, In version 4 of the support library the FragmentManager is the supportFragmentManager.

Solution 2:

If you switch to v4, it should work by just adding this constructor on your FragmentPagerAdapter class:

/** Constructor of the class */
public FragmentPagerAdapter(FragmentManager fragmentManager) {
    super(fragmentManager);
}

Post a Comment for "Fragmentpageradapter - Unable To Resolve Superclass"