Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 5845523
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T12:26:49+00:00 2026-05-22T12:26:49+00:00

Any clue why my Android app is hanging on this code block when I

  • 0

Any clue why my Android app is hanging on this code block when I try to debug it in Eclipse?

public static final int REMOVE_PROVIDER         = 131;

—

package com.example.myapp;

import android.app.TabActivity;
import android.content.Intent;
import android.content.res.Resources;
import android.os.Bundle;
import android.widget.TabHost;

public class TEHWARRiORS extends TabActivity {
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);

        Resources res = getResources(); // Resource object to get Drawables
        TabHost tabHost = getTabHost();  // The activity TabHost
        TabHost.TabSpec spec;  // Resusable TabSpec for each tab
        Intent intent;  // Reusable Intent for each tab

        // Create an Intent to launch an Activity for the tab (to be reused)
        intent = new Intent().setClass(this, Start.class);

        // Initialize a TabSpec for each tab and add it to the TabHost
        spec = tabHost.newTabSpec("Start").setIndicator("",
                          res.getDrawable(R.drawable.ic_tab_navbar_admins))
                      .setContent(intent);
        tabHost.addTab(spec);

        // Do the same for the other tabs
        intent = new Intent().setClass(this, Servrar.class);
        spec = tabHost.newTabSpec("Servrar").setIndicator("Servrar",
                          res.getDrawable(R.drawable.ic_tab_navbar_admins))
                      .setContent(intent);
        tabHost.addTab(spec);

        intent = new Intent().setClass(this, Admins.class);
        spec = tabHost.newTabSpec("Admins").setIndicator("Admins",
                          res.getDrawable(R.drawable.ic_tab_navbar_admins))
                      .setContent(intent);
        tabHost.addTab(spec);

        intent = new Intent().setClass(this, Regler.class);
        spec = tabHost.newTabSpec("Regler").setIndicator("Regler",
                          res.getDrawable(R.drawable.ic_tab_navbar_admins))
                      .setContent(intent);
        tabHost.addTab(spec);

        tabHost.setCurrentTab(0);

    }
}

—

05-15 20:46:09.969: ERROR/AndroidRuntime(15352): FATAL EXCEPTION: main
05-15 20:46:09.969: ERROR/AndroidRuntime(15352): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.testapp/com.example.testapp.TEHWARRiORS}: java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.testapp/com.example.testapp.Start}: java.lang.RuntimeException: Your content must have a TabHost whose id attribute is 'android.R.id.tabhost'
05-15 20:46:09.969: ERROR/AndroidRuntime(15352):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1816)
05-15 20:46:09.969: ERROR/AndroidRuntime(15352):     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1837)
05-15 20:46:09.969: ERROR/AndroidRuntime(15352):     at android.app.ActivityThread.access$1500(ActivityThread.java:132)
05-15 20:46:09.969: ERROR/AndroidRuntime(15352):     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1033)
05-15 20:46:09.969: ERROR/AndroidRuntime(15352):     at android.os.Handler.dispatchMessage(Handler.java:99)
05-15 20:46:09.969: ERROR/AndroidRuntime(15352):     at android.os.Looper.loop(Looper.java:143)
05-15 20:46:09.969: ERROR/AndroidRuntime(15352):     at android.app.ActivityThread.main(ActivityThread.java:4196)
05-15 20:46:09.969: ERROR/AndroidRuntime(15352):     at java.lang.reflect.Method.invokeNative(Native Method)
05-15 20:46:09.969: ERROR/AndroidRuntime(15352):     at java.lang.reflect.Method.invoke(Method.java:507)
05-15 20:46:09.969: ERROR/AndroidRuntime(15352):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
05-15 20:46:09.969: ERROR/AndroidRuntime(15352):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
05-15 20:46:09.969: ERROR/AndroidRuntime(15352):     at dalvik.system.NativeStart.main(Native Method)
05-15 20:46:09.969: ERROR/AndroidRuntime(15352): Caused by: java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.testapp/com.example.testapp.Start}: java.lang.RuntimeException: Your content must have a TabHost whose id attribute is 'android.R.id.tabhost'
05-15 20:46:09.969: ERROR/AndroidRuntime(15352):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1816)
05-15 20:46:09.969: ERROR/AndroidRuntime(15352):     at android.app.ActivityThread.startActivityNow(ActivityThread.java:1651)
05-15 20:46:09.969: ERROR/AndroidRuntime(15352):     at android.app.LocalActivityManager.moveToState(LocalActivityManager.java:127)
05-15 20:46:09.969: ERROR/AndroidRuntime(15352):     at android.app.LocalActivityManager.startActivity(LocalActivityManager.java:339)
05-15 20:46:09.969: ERROR/AndroidRuntime(15352):     at android.widget.TabHost$IntentContentStrategy.getContentView(TabHost.java:656)
05-15 20:46:09.969: ERROR/AndroidRuntime(15352):     at android.widget.TabHost.setCurrentTab(TabHost.java:326)
05-15 20:46:09.969: ERROR/AndroidRuntime(15352):     at android.widget.TabHost.addTab(TabHost.java:216)
05-15 20:46:09.969: ERROR/AndroidRuntime(15352):     at com.example.testapp.TEHWARRiORS.onCreate(TEHWARRiORS.java:28)
05-15 20:46:09.969: ERROR/AndroidRuntime(15352):     at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1093)
05-15 20:46:09.969: ERROR/AndroidRuntime(15352):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1780)
05-15 20:46:09.969: ERROR/AndroidRuntime(15352):     ... 11 more
05-15 20:46:09.969: ERROR/AndroidRuntime(15352): Caused by: java.lang.RuntimeException: Your content must have a TabHost whose id attribute is 'android.R.id.tabhost'
05-15 20:46:09.969: ERROR/AndroidRuntime(15352):     at android.app.TabActivity.onContentChanged(TabActivity.java:105)
05-15 20:46:09.969: ERROR/AndroidRuntime(15352):     at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:227)
05-15 20:46:09.969: ERROR/AndroidRuntime(15352):     at android.app.Activity.setContentView(Activity.java:1702)
05-15 20:46:09.969: ERROR/AndroidRuntime(15352):     at com.example.testapp.Start.onCreate(Start.java:11)
05-15 20:46:09.969: ERROR/AndroidRuntime(15352):     at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1093)
05-15 20:46:09.969: ERROR/AndroidRuntime(15352):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1780)
05-15 20:46:09.969: ERROR/AndroidRuntime(15352):     ... 20 more
05-15 20:46:21.539: ERROR/SurfaceFlinger(1328): layer=0x19971f8 is not in the purgatory list
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T12:26:49+00:00Added an answer on May 22, 2026 at 12:26 pm

    Well, there you go:

    05-15 20:46:09.969: ERROR/AndroidRuntime(15352): Caused by: java.lang.RuntimeException: Your content must have a TabHost whose id attribute is 'android.R.id.tabhost'
    05-15 20:46:09.969: ERROR/AndroidRuntime(15352):     at android.app.TabActivity.onContentChanged(TabActivity.java:105)
    

    You are using a TabActivity but have replaced its content with something that doesn’t have a tab host.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Does anyone have any clue why a code behind function would work in Firefox
Hullo all, Wondering if there are any Java hackers who can clue me in
Any recommendations for a javascript form validation library. I could try and roll my
There is an class android.os.Build that got static variables cointaining device info, but when
I have a client who has a requirement for a chatting app. This app
Any clue on how to set padding on left/right/top/bottom of a UITextView?
Can i get the source code for a WAMP stack installer somewhere? Any help
My Android App post HTTP requests to PHPs on Godaddy servers on shared economy
Any personal experience in overcoming web application performance hurdles? Any recommended strategies for improving
Any good recommendations for a platform agnostic (i.e. Javascript) grid control/plugin that will accept

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.