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 6601571
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T18:46:17+00:00 2026-05-25T18:46:17+00:00

i am working in android. I want to make TabHost and Tab widget. this

  • 0

i am working in android. I want to make TabHost and Tab widget. this is my manifest:-

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
      package="com.pericent"
      android:versionCode="1"
      android:versionName="1.0">
    <application android:icon="@drawable/icon" android:label="@string/app_name">
       <activity android:name=".HelloTabWidget" 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>
             <Acivity android:name=".AlbumsActivity" android:label="@string/app_name" />
        <activity android:name=".ArtistsActivity" android:label="@string/app_name" />

         <Acivity android:name=".SongsActivity" android:label="@string/app_name" />
    </application>
</manifest> 

and this is my HelloTabWidget.java
package com.pericent;

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

public class HelloTabWidget extends TabActivity  {

    private String TAG="HelloTabWidget";

    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 intent1;  // Reusable Intent for each tab
        Intent intent2;
        Intent intent3;

        intent2 = new Intent().setClass(this, AlbumsActivity.class);
        Log.v(TAG,"---album activity is called---");
        spec = tabHost.newTabSpec("albums").setIndicator("Albums",res.getDrawable(R.drawable.ic_tab_albums)).setContent(intent2);
        tabHost.addTab(spec);

        // Create an Intent to launch an Activity for the tab (to be reused)
                intent1 = new Intent().setClass(this, ArtistsActivity.class);
        Log.v(TAG,"---artist activity is called---");
        // Initialize a TabSpec for each tab and add it to the TabHost
        spec = tabHost.newTabSpec("artists").setIndicator("Artists",res.getDrawable(R.drawable.ic_tab_artists)).setContent(intent1);
        tabHost.addTab(spec);

        // Do the same for the other tabs

     }

}

whenever i run this project this create an error that “Unable to start activity ComponentInfo{com.pericent/com.pericent.HelloTabWidget}: android.content.ActivityNotFoundException: Unable to find explicit activity class {com.pericent/com.pericent.AlbumsActivity}; have you declared this activity in your AndroidManifest.xml?“

but as you see i declared this class in manifest file. please check this and help to find out the mistake which i have done.
Thank you in advance.

  • 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-25T18:46:18+00:00Added an answer on May 25, 2026 at 6:46 pm

    I think problem is with your tag

    <Acivity android:name=".AlbumsActivity" android:label="@string/app_name" />
    

    Remove caps from Activity use small “a”

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

Sidebar

Related Questions

I am working in android, i want to make a scrollview. this is my
I want to make a http request with android. is use this: void testHTTP()
Here i make 5 Tab buttons that are working proper but now i want
I am working in android . I want to make sharedpreference in my code,
I just started working on a new Eclipse Android project and want to make
I am working in android. I want to show a list of events. I
I'm working on a relatively simple Android app. I want it to have an
I want to make a page for android which is refreshing in every sec
I want to get fling gesture detection working in my Android application. What I
I have some code which is working in iphone and i want to make

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.