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

  • SEARCH
  • Home
  • 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 7788877
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T21:07:04+00:00 2026-06-01T21:07:04+00:00

I have recently started Android development, and i already know Java. So i was

  • 0

I have recently started Android development, and i already know Java. So i was following
This tutorial on the android development site about how to create a tabbed layout.
Even though i went after everything in the tutorial and eclipse prompts no errors, the application crashes when i run it on a froyo API level 8 Emulator. My application is build as well on API level 8.

What i think might cause it:
1) I seem to have a warning in the AndroidManifest.xml which i dont understand, it highlights this line:

<uses-sdk android:minSdkVersion="8" />

2) In the tutorial they created a page with 3 tabs, while im using 5 tabs. maybe thats it??]

My code:

Main activity:

package ent.com;


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

public class TestActivity 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(); 
    TabHost tabHost = getTabHost(); 
    TabHost.TabSpec spec;  
    Intent intent; 

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

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

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

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

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

    intent = new Intent().setClass(this, Next.class);
    spec = tabHost.newTabSpec("next").setIndicator("Next Game",
                      res.getDrawable(R.drawable.ic_tab_next))
                  .setContent(intent);
    tabHost.addTab(spec);

    tabHost.setCurrentTab(2);
}
}

My AndroidManifest.xml:

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="ent.com"
android:versionCode="1"
android:versionName="1.0" >

<uses-sdk android:minSdkVersion="8" />

<application
    android:icon="@drawable/ic_launcher"
    android:label="@string/app_name" >
    <activity
        android:name=".TestActivity"
        android:label="@string/app_name"
        android:theme="@android:style/Theme.NoTitleBar">
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />

            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>
</application>

</manifest>

Thanks for any help!

  • 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-06-01T21:07:05+00:00Added an answer on June 1, 2026 at 9:07 pm

    you need to mention every other activity in the manifest too.

    <activity android:name=".Players"
    </activity>
    <activity android:name=".Staff"
    </activity>
    <activity android:name=".League"
    </activity>
    <activity android:name=".Finance"
    </activity>
    <activity android:name=".Next"
    </activity>    
    

    an activity undeclared in the manifest can cause the app to crash.

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

Sidebar

Related Questions

I have recently started seeing user agents like Java/1.6.0_14 (and variations) on my site
I have recently started learning java for creating android apps. I have spent hours
Maybe some might find this, a hypothetical question. I have recently started development of
I have the following question, recently I started with the study of Android and
I have recently started learning Android development. In the android-sdk/tools folder, there should be
I have recently started programming in WPF and bumped into the following problem. I
I have recently started using Zend Studio which has reported as warning the following
We have recently started to see this exception while running the play framework in
Background: I have started Android recently. I want to make an application for Android
I recently started using android actionbars and contextual action bars (CAB). I have just

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.