java.lang.ClassCastException: com.example.brian.chatapp.MainActivity cannot be cast to android.support.v7.app.ActionBarActivity

Stack Overflow | Brian | 8 months ago
tip
Click on the to mark the solution that helps you, Samebug will learn from it.
As a community member, you’ll be rewarded for you help.
  1. 0

    How to declare ArrayList? (Identifier Expected)

    Stack Overflow | 8 months ago | Brian
    java.lang.ClassCastException: com.example.brian.chatapp.MainActivity cannot be cast to android.support.v7.app.ActionBarActivity
  2. 0

    Issue with android.support.v7.app.ActionBarActivity

    Stack Overflow | 8 months ago | Brian
    java.lang.ClassCastException: com.example.brian.chatapp.MainActivity cannot be cast to android.support.v7.app.ActionBarActivity
  3. 0

    ClassCastException when trying to pass custom object implementing parcelable to another activity using Intent

    Stack Overflow | 3 years ago | udiboy1209
    java.lang.ClassCastException: [Ljava.lang.Object; at com.meet.simulators.wavesonstringsimulator.SettingsActivity.onClick(SettingsActivity.java:37)            at java.lang.reflect.Method.invokeNative(Native Method)
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Weka: Use saved train model to run test on android

    Stack Overflow | 3 years ago | Mr Vy
    java.lang.ClassCastException: weka.classifiers.trees.J48 09-12 11:27:26.626: W/System.err(323): at vta.behaviourtrack.Classifier.onCreate(Classifier.java:72) 09-12 11:27:26.626: W/System.err(323): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047) 09-12 11:27:26.626: W/System.err(323): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1611) 09-12 11:27:26.636: W/System.err(323): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1663) 09-12 11:27:26.636: W/System.err(323): at android.app.ActivityThread.access$1500(ActivityThread.java:117) 09-12 11:27:26.647: W/System.err(323): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:931) 09-12 11:27:26.647: W/System.err(323): at android.os.Handler.dispatchMessage(Handler.java:99) 09-12 11:27:26.657: W/System.err(323): at android.os.Looper.loop(Looper.java:123) 09-12 11:27:26.666: W/System.err(323): at android.app.ActivityThread.main(ActivityThread.java:3683) 09-12 11:27:26.666: W/System.err(323): at java.lang.reflect.Method.invokeNative(Native Method)
  6. 0

    [ProgressBar] ClassCastException warning

    GitHub | 4 years ago | tmurakami
    java.lang.ClassCastException: com.WazaBe.HoloEverywhere.drawable.RotateDrawable 10-11 13:12:31.338: W/System.err(24229): at com.WazaBe.HoloEverywhere.widget.ProgressBar.getDrawable(ProgressBar.java:305) 10-11 13:12:31.338: W/System.err(24229): at com.WazaBe.HoloEverywhere.widget.ProgressBar.<init>(ProgressBar.java:249) 10-11 13:12:31.346: W/System.err(24229): at com.WazaBe.HoloEverywhere.widget.ProgressBar.<init>(ProgressBar.java:205) 10-11 13:12:31.346: W/System.err(24229): at com.WazaBe.HoloEverywhere.widget.ProgressBar.<init>(ProgressBar.java:201) 10-11 13:12:31.346: W/System.err(24229): at java.lang.reflect.Constructor.constructNative(Native Method) 10-11 13:12:31.346: W/System.err(24229): at java.lang.reflect.Constructor.newInstance(Constructor.java:415) 10-11 13:12:31.356: W/System.err(24229): at android.view.LayoutInflater.createView(LayoutInflater.java:505) 10-11 13:12:31.356: W/System.err(24229): at com.WazaBe.HoloEverywhere.LayoutInflater.onCreateView(LayoutInflater.java:183) 10-11 13:12:31.356: W/System.err(24229): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:568) 10-11 13:12:31.356: W/System.err(24229): at android.view.LayoutInflater.rInflate(LayoutInflater.java:623) 10-11 13:12:31.356: W/System.err(24229): at android.view.LayoutInflater.inflate(LayoutInflater.java:408) 10-11 13:12:31.367: W/System.err(24229): at android.view.LayoutInflater.inflate(LayoutInflater.java:320) 10-11 13:12:31.376: W/System.err(24229): at android.view.LayoutInflater.inflate(LayoutInflater.java:276) 10-11 13:12:31.376: W/System.err(24229): at com.WazaBe.HoloEverywhere.LayoutInflater.inflate(LayoutInflater.java:161) 10-11 13:12:31.376: W/System.err(24229): at com.WazaBe.HoloEverywhere.app.ProgressDialog.onCreate(ProgressDialog.java:176) 10-11 13:12:31.376: W/System.err(24229): at android.app.Dialog.dispatchOnCreate(Dialog.java:307) 10-11 13:12:31.376: W/System.err(24229): at android.app.Dialog.show(Dialog.java:225) 10-11 13:12:31.376: W/System.err(24229): at com.WazaBe.HoloDemo.DemoActivity.showProgressDialog(DemoActivity.java:209) 10-11 13:12:31.386: W/System.err(24229): at java.lang.reflect.Method.invokeNative(Native Method)

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.ClassCastException

      com.example.brian.chatapp.MainActivity cannot be cast to android.support.v7.app.ActionBarActivity

      at com.example.brian.fragments.Chats.onCreateView()
    2. com.example.brian
      Chats.onCreateView
      1. com.example.brian.fragments.Chats.onCreateView(Chats.java:35)
      1 frame
    3. Android Support v4
      ViewPager.onMeasure
      1. android.support.v4.app.Fragment.performCreateView(Fragment.java:2074)
      2. android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1104)
      3. android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1286)
      4. android.support.v4.app.BackStackRecord.run(BackStackRecord.java:758)
      5. android.support.v4.app.FragmentManagerImpl.execSingleAction(FragmentManager.java:1632)
      6. android.support.v4.app.BackStackRecord.commitNowAllowingStateLoss(BackStackRecord.java:637)
      7. android.support.v4.app.FragmentPagerAdapter.finishUpdate(FragmentPagerAdapter.java:143)
      8. android.support.v4.view.ViewPager.populate(ViewPager.java:1235)
      9. android.support.v4.view.ViewPager.populate(ViewPager.java:1083)
      10. android.support.v4.view.ViewPager.onMeasure(ViewPager.java:1609)
      10 frames
    4. Android Platform
      ViewGroup.measureChildWithMargins
      1. android.view.View.measure(View.java:17430)
      2. android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5463)
      2 frames
    5. android.support.design
      CoordinatorLayout.onMeasure
      1. android.support.design.widget.CoordinatorLayout.onMeasureChild(CoordinatorLayout.java:669)
      2. android.support.design.widget.HeaderScrollingViewBehavior.onMeasureChild(HeaderScrollingViewBehavior.java:89)
      3. android.support.design.widget.AppBarLayout$ScrollingViewBehavior.onMeasureChild(AppBarLayout.java:1319)
      4. android.support.design.widget.CoordinatorLayout.onMeasure(CoordinatorLayout.java:734)
      4 frames
    6. Android Platform
      FrameLayout.onMeasure
      1. android.view.View.measure(View.java:17430)
      2. android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5463)
      3. android.widget.FrameLayout.onMeasure(FrameLayout.java:430)
      3 frames
    7. Android v7
      ContentFrameLayout.onMeasure
      1. android.support.v7.widget.ContentFrameLayout.onMeasure(ContentFrameLayout.java:135)
      1 frame
    8. Android Platform
      FrameLayout.onMeasure
      1. android.view.View.measure(View.java:17430)
      2. android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5463)
      3. android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1436)
      4. android.widget.LinearLayout.measureVertical(LinearLayout.java:722)
      5. android.widget.LinearLayout.onMeasure(LinearLayout.java:613)
      6. android.view.View.measure(View.java:17430)
      7. android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5463)
      8. android.widget.FrameLayout.onMeasure(FrameLayout.java:430)
      9. android.view.View.measure(View.java:17430)
      10. android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5463)
      11. android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1436)
      12. android.widget.LinearLayout.measureVertical(LinearLayout.java:722)
      13. android.widget.LinearLayout.onMeasure(LinearLayout.java:613)
      14. android.view.View.measure(View.java:17430)
      15. android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5463)
      16. android.widget.FrameLayout.onMeasure(FrameLayout.java:430)
      16 frames
    9. Android
      PhoneWindow$DecorView.onMeasure
      1. com.android.internal.policy.impl.PhoneWindow$DecorView.onMeasure(PhoneWindow.java:2560)
      1 frame
    10. Android Platform
      ActivityThread.main
      1. android.view.View.measure(View.java:17430)
      2. android.view.ViewRootImpl.performMeasure(ViewRootImpl.java:2001)
      3. android.view.ViewRootImpl.measureHierarchy(ViewRootImpl.java:1166)
      4. android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1372)
      5. android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1054)
      6. android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:5779)
      7. android.view.Choreographer$CallbackRecord.run(Choreographer.java:767)
      8. android.view.Choreographer.doCallbacks(Choreographer.java:580)
      9. android.view.Choreographer.doFrame(Choreographer.java:550)
      10. android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:753)
      11. android.os.Handler.handleCallback(Handler.java:739)
      12. android.os.Handler.dispatchMessage(Handler.java:95)
      13. android.os.Looper.loop(Looper.java:135)
      14. android.app.ActivityThread.main(ActivityThread.java:5221)
      14 frames
    11. Java RT
      Method.invoke
      1. java.lang.reflect.Method.invoke(Native Method)
      2. java.lang.reflect.Method.invoke(Method.java:372)
      2 frames