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

bignerdranch.com | 7 months ago
tip
Do you know that we can give you better hits? Get more relevant results from Samebug’s stack trace search.
  1. 0

    getactivity().getActioBar() returns null in fragment - 16. The Action Bar - Big Nerd Ranch Books Forums

    bignerdranch.com | 7 months ago
    java.lang.ClassCastException: com.example.manel.criminalintent.CrimePagerActivity cannot be cast to android.support.v7.app.AppCompatActivity

    Root Cause Analysis

    1. java.lang.ClassCastException

      com.example.manel.criminalintent.CrimePagerActivity cannot be cast to android.support.v7.app.AppCompatActivity

      at com.example.manel.criminalintent.CrimeFragment.onCreateView()
    2. com.example.manel
      CrimeFragment.onCreateView
      1. com.example.manel.criminalintent.CrimeFragment.onCreateView(CrimeFragment.java:64)
      1 frame
    3. Android Support v4
      ViewPager.onMeasure
      1. android.support.v4.app.Fragment.performCreateView(Fragment.java:1962)
      2. android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1067)
      3. android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1248)
      4. android.support.v4.app.BackStackRecord.run(BackStackRecord.java:738)
      5. android.support.v4.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1613)
      6. android.support.v4.app.FragmentManagerImpl.executePendingTransactions(FragmentManager.java:570)
      7. android.support.v4.app.FragmentStatePagerAdapter.finishUpdate(FragmentStatePagerAdapter.java:163)
      8. android.support.v4.view.ViewPager.populate(ViewPager.java:1106)
      9. android.support.v4.view.ViewPager.populate(ViewPager.java:952)
      10. android.support.v4.view.ViewPager.onMeasure(ViewPager.java:1474)
      10 frames
    4. Android Platform
      FrameLayout.onMeasure
      1. android.view.View.measure(View.java:16566)
      2. android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5145)
      3. android.widget.FrameLayout.onMeasure(FrameLayout.java:310)
      3 frames