java.lang.ClassCastException: com.example.manel.criminalintent.CrimePagerActivity cannot be cast to android.support.v7.app.AppCompatActivity

Searched on Google with the first line of a JAVA stack trace?

We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.

Recommended solutions based on your search

Solutions on the web

via bignerdranch.com by Unknown author, 1 year ago
com.example.manel.criminalintent.CrimePagerActivity cannot be cast to android.support.v7.app.AppCompatActivity
java.lang.ClassCastException: com.example.manel.criminalintent.CrimePagerActivity cannot be cast to android.support.v7.app.AppCompatActivity
at com.example.manel.criminalintent.CrimeFragment.onCreateView(CrimeFragment.java:64)
at android.support.v4.app.Fragment.performCreateView(Fragment.java:1962)
at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1067)
at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1248)
at android.support.v4.app.BackStackRecord.run(BackStackRecord.java:738)
at android.support.v4.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1613)
at android.support.v4.app.FragmentManagerImpl.executePendingTransactions(FragmentManager.java:570)
at android.support.v4.app.FragmentStatePagerAdapter.finishUpdate(FragmentStatePagerAdapter.java:163)
at android.support.v4.view.ViewPager.populate(ViewPager.java:1106)
at android.support.v4.view.ViewPager.populate(ViewPager.java:952)
at android.view.View.measure(View.java:16566)
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5145)
at android.widget.FrameLayout.onMeasure(FrameLayout.java:310)

Users with the same issue

You are the first who have seen this exception. Write a tip to help other users and build your expert profile.

Know the solutions? Share your knowledge to help other developers to debug faster.