I observe a weird exception thrown on line:
viewPager = (ViewPager) view.findViewById(R.id.pager);
the exception looks as follows:
java.lang.ClassCastException: android.support.v4.view.ViewPager cannot be cast to android.support.v4.view.ViewPager
I can't reproduce it, but it happens sometimes according to logs.
The app uses official multidex build with gradle.
According to the JLS, ClassCastException
happens when you try to cast one class to a different class, which is quite obvious.
What is not so obvious is what is the definition of Class identity:
ClassLoader
In your case multiple ClassLoader
s will most likely load the same class.