the_prole the_prole - 1 month ago 15
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

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.

Answer

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