the_prole the_prole - 9 months ago 66
Android Question

Cannot resolve symbol 'ViewPagerAdapter'

This line

ViewPagerAdapter adapter = new ViewPagerAdapter(getSupportFragmentManager());

Throws this error

Cannot resolve symbol 'ViewPagerAdapter'

Even though I have imported required library


And have compiled the right version

compile ''

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

Answer Source

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