the_prole - 9 months ago 66
Android Question

This line

 ViewPagerAdapter adapter = new ViewPagerAdapter(getSupportFragmentManager());


Throws this error

Even though I have imported required library

import android.support.v4.view.ViewPager;


And have compiled the right version

compile 'com.android.support:support-v4:25.0.0'


SO has many suggestion to resolve this error, but I believe I have attempted them all including rebuilding, cleaning, and invalidating caches and restarting.

I don't believe there is such a class as ViewPagerAdapter. Are you looking for FragmentStatePagerAdapter (docs)?