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 Stack Overflow by Brian
, 1 year ago
com.example.brian.chatapp.MainActivity cannot be cast to android.support.v7.app.ActionBarActivity
via Stack Overflow by Brian
, 1 year ago
com.example.brian.chatapp.MainActivity cannot be cast to android.support.v7.app.ActionBarActivity
java.lang.ClassCastException: com.example.brian.chatapp.MainActivity cannot be cast to android.support.v7.app.ActionBarActivity	at com.example.brian.fragments.Chats.onCreateView(Chats.java:35)	at android.support.v4.app.Fragment.performCreateView(Fragment.java:2074)	at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1104)	at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1286)	at android.support.v4.app.BackStackRecord.run(BackStackRecord.java:758)	at android.support.v4.app.FragmentManagerImpl.execSingleAction(FragmentManager.java:1632)	at android.support.v4.app.BackStackRecord.commitNowAllowingStateLoss(BackStackRecord.java:637)	at android.support.v4.app.FragmentPagerAdapter.finishUpdate(FragmentPagerAdapter.java:143)	at android.support.v4.view.ViewPager.populate(ViewPager.java:1235)	at android.support.v4.view.ViewPager.populate(ViewPager.java:1083)	at android.support.v4.view.ViewPager.onMeasure(ViewPager.java:1609)	at android.view.View.measure(View.java:17430)	at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5463)	at android.support.design.widget.CoordinatorLayout.onMeasureChild(CoordinatorLayout.java:669)	at android.support.design.widget.HeaderScrollingViewBehavior.onMeasureChild(HeaderScrollingViewBehavior.java:89)	at android.support.design.widget.AppBarLayout$ScrollingViewBehavior.onMeasureChild(AppBarLayout.java:1319)	at android.support.design.widget.CoordinatorLayout.onMeasure(CoordinatorLayout.java:734)	at android.view.View.measure(View.java:17430)	at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5463)	at android.widget.FrameLayout.onMeasure(FrameLayout.java:430)	at android.support.v7.widget.ContentFrameLayout.onMeasure(ContentFrameLayout.java:135)	at android.view.View.measure(View.java:17430)	at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5463)	at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1436)	at android.widget.LinearLayout.measureVertical(LinearLayout.java:722)	at android.widget.LinearLayout.onMeasure(LinearLayout.java:613)	at android.view.View.measure(View.java:17430)	at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5463)	at android.widget.FrameLayout.onMeasure(FrameLayout.java:430)	at android.view.View.measure(View.java:17430)	at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5463)	at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1436)	at android.widget.LinearLayout.measureVertical(LinearLayout.java:722)	at android.widget.LinearLayout.onMeasure(LinearLayout.java:613)	at android.view.View.measure(View.java:17430)	at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5463)	at android.widget.FrameLayout.onMeasure(FrameLayout.java:430)	at com.android.internal.policy.impl.PhoneWindow$DecorView.onMeasure(PhoneWindow.java:2560)	at android.view.View.measure(View.java:17430)	at android.view.ViewRootImpl.performMeasure(ViewRootImpl.java:2001)	at android.view.ViewRootImpl.measureHierarchy(ViewRootImpl.java:1166)	at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1372)	at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1054)	at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:5779)	at android.view.Choreographer$CallbackRecord.run(Choreographer.java:767)	at android.view.Choreographer.doCallbacks(Choreographer.java:580)	at android.view.Choreographer.doFrame(Choreographer.java:550)	at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:753)	at android.os.Handler.handleCallback(Handler.java:739)	at android.os.Handler.dispatchMessage(Handler.java:95)	at android.os.Looper.loop(Looper.java:135)	at android.app.ActivityThread.main(ActivityThread.java:5221)	at java.lang.reflect.Method.invoke(Native Method)	at java.lang.reflect.Method.invoke(Method.java:372)