java.lang.RuntimeException

Unable to start activity ComponentInfo{com.world.bolandian.tests/com.world.bolandian.tests.TabHostMain}: java.lang.ClassCastException: android.widget.RelativeLayout cannot be cast to android.widget.TabHost

Solutions on the web41359

  • Unable to start activity ComponentInfo{com.world.bolandian.tests/com.world.bolandian.tests.TabHostMain}: java.lang.ClassCastException: android.widget.RelativeLayout cannot be cast to android.widget.TabHost
  • via Stack Overflow by Jack
    , 1 year ago
    Unable to start activity ComponentInfo{com.Test.projecttest/com.Test.projecttest.TabActivities}: java.lang.ClassCastException: android.widget.TabHost cannot be cast to android.support.v4.app.FragmentTabHost
  • via GitHub by tbremer19
    , 11 months ago
    Unable to start activity ComponentInfo{com.android.systemui/com.android.systemui.recents.RecentsActivity}: java.lang.ClassCastException: android.widget.RelativeLayout cannot be cast to com.android.systemui.recents.views.RecentsEmptyView
  • Stack trace

    • java.lang.RuntimeException: Unable to start activity ComponentInfo{com.world.bolandian.tests/com.world.bolandian.tests.TabHostMain}: java.lang.ClassCastException: android.widget.RelativeLayout cannot be cast to android.widget.TabHost at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2305) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2365) at android.app.ActivityThread.access$800(ActivityThread.java:148) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1283) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:135) at android.app.ActivityThread.main(ActivityThread.java:5272) at java.lang.reflect.Method.invoke(Native Method) at java.lang.reflect.Method.invoke(Method.java:372) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:909) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:704) Caused by: java.lang.ClassCastException: android.widget.RelativeLayout cannot be cast to android.widget.TabHost at android.app.TabActivity.onContentChanged(TabActivity.java:128) at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:391) at android.app.Activity.setContentView(Activity.java:2188) at com.world.bolandian.tests.TabHostMain.onCreate(TabHostMain.java:15) at android.app.Activity.performCreate(Activity.java:5977) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1105) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2258)

    Write tip

    You have a different solution? A short tip here would help you and many other users who saw this issue last week.

    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.