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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T02:25:50+00:00 2026-05-16T02:25:50+00:00

I’m very new to android, in fact only started yesterday. I managed to get

  • 0

I’m very new to android, in fact only started yesterday. I managed to get an application setup with tabs. It works fine on a 2.2 virtual avd (i think it is called). But the version my HTC has is 2.0.1
I’m posting snippets of the code below as well as debug info.

Logcat shows the following error

08-02 09:56:05.946: WARN/dalvikvm(414): threadid=3: thread exiting with uncaught exception (group=0x4001b188)
08-02 09:56:05.956: ERROR/AndroidRuntime(414): Uncaught handler: thread main exiting due to uncaught exception
08-02 09:56:06.196: ERROR/AndroidRuntime(414): java.lang.RuntimeException: Unable to start activity ComponentInfo{org.hyperActiveSolutions/org.hyperActiveSolutions.Organizer}: java.lang.NullPointerException
08-02 09:56:06.196: ERROR/AndroidRuntime(414):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2481)
08-02 09:56:06.196: ERROR/AndroidRuntime(414):     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2497)

There is more to that but i thought this was the relevant bit, the rest is just the long stack trace.

My android manifest file looks like this

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
      package="org.hyperActiveSolutions"
      android:versionCode="1"
      android:versionName="1.0">
    <application android:icon="@drawable/icon" android:label="@string/app_name">
        <activity android:label="@string/app_name"
                  android:theme="@android:style/Theme.NoTitleBar" android:name="Organizer">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>

    <activity android:name="Home" ></activity>
<activity android:name="Account"></activity>
<activity android:name="Agenda" ></activity>
<activity android:name="Lists" ></activity>
</application>

<uses-sdk android:minSdkVersion="6" android:targetSdkVersion="6"></uses-sdk>
</manifest> 

As you can see the minimum sdk and the target have been set to my phone’s version. This is the start of my entry class. Below where this snippet ends is 3 other tabs being added in exactly the same way as Home.

public class Organizer extends TabActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);     
        this.setContentView(R.layout.main);
        final TabHost tabHost = getTabHost();  // The activity TabHost

   // Create an Intent to launch an Activity for the tab (to be reused)


   // Initialize a TabSpec for each tab and add it to the TabHost
   tabHost.addTab(tabHost.newTabSpec("home").setIndicator("Home",
            getResources().getDrawable(R.drawable.home)).setContent(new Intent().setClass(this, Home.class)));

All my resources exists including the classes i’m instantiating with each tab.
The only other thing i can think of that might be relevant is my main.xml for the layout.
It was copied from the android dev site, in one of the tutorials.

<?xml version="1.0" encoding="utf-8"?>
<TabHost xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@android:id/tabhost"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent">
    <LinearLayout
        android:layout_width="fill_parent"
        android:layout_height="fill_parent">
        <TabWidget
            android:id="@android:id/tabs"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content" />
        <FrameLayout
            android:id="@android:id/tabcontent"
            android:layout_width="fill_parent"
            android:layout_height="fill_parent" />
    </LinearLayout>
</TabHost>

As i said it works fine on version 2.2 but dies on 2.0.1 and the message displayed on screen is just “Organizer termintated unexpectedly”….part of the message anyway.

So can anyone spot anything i have that would make it not compatible with the 2.0.1 SDK.

thanks in advance

full stack trace

08-02 11:47:54.006: WARN/dalvikvm(2588): threadid=3: thread exiting with uncaught exception (group=0x4001b188)
08-02 11:47:54.016: ERROR/AndroidRuntime(2588): Uncaught handler: thread main exiting due to uncaught exception
08-02 11:47:54.256: ERROR/AndroidRuntime(2588): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.organizer/com.organizer.Organizer}: java.lang.NullPointerException
08-02 11:47:54.256: ERROR/AndroidRuntime(2588):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2481)
08-02 11:47:54.256: ERROR/AndroidRuntime(2588):     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2497)
08-02 11:47:54.256: ERROR/AndroidRuntime(2588):     at android.app.ActivityThread.access$2200(ActivityThread.java:119)
08-02 11:47:54.256: ERROR/AndroidRuntime(2588):     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1848)
08-02 11:47:54.256: ERROR/AndroidRuntime(2588):     at android.os.Handler.dispatchMessage(Handler.java:99)
08-02 11:47:54.256: ERROR/AndroidRuntime(2588):     at android.os.Looper.loop(Looper.java:123)
08-02 11:47:54.256: ERROR/AndroidRuntime(2588):     at android.app.ActivityThread.main(ActivityThread.java:4338)
08-02 11:47:54.256: ERROR/AndroidRuntime(2588):     at java.lang.reflect.Method.invokeNative(Native Method)
08-02 11:47:54.256: ERROR/AndroidRuntime(2588):     at java.lang.reflect.Method.invoke(Method.java:521)
08-02 11:47:54.256: ERROR/AndroidRuntime(2588):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:860)
08-02 11:47:54.256: ERROR/AndroidRuntime(2588):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)
08-02 11:47:54.256: ERROR/AndroidRuntime(2588):     at dalvik.system.NativeStart.main(Native Method)
08-02 11:47:54.256: ERROR/AndroidRuntime(2588): Caused by: java.lang.NullPointerException
08-02 11:47:54.256: ERROR/AndroidRuntime(2588):     at android.widget.TabWidget.onFocusChange(TabWidget.java:351)
08-02 11:47:54.256: ERROR/AndroidRuntime(2588):     at android.view.View.onFocusChanged(View.java:2622)
08-02 11:47:54.256: ERROR/AndroidRuntime(2588):     at android.view.View.handleFocusGainInternal(View.java:2445)
08-02 11:47:54.256: ERROR/AndroidRuntime(2588):     at android.view.ViewGroup.handleFocusGainInternal(ViewGroup.java:403)
08-02 11:47:54.256: ERROR/AndroidRuntime(2588):     at android.view.View.requestFocus(View.java:3562)
08-02 11:47:54.256: ERROR/AndroidRuntime(2588):     at android.view.ViewGroup.requestFocus(ViewGroup.java:975)
08-02 11:47:54.256: ERROR/AndroidRuntime(2588):     at android.view.ViewGroup.onRequestFocusInDescendants(ViewGroup.java:1020)
08-02 11:47:54.256: ERROR/AndroidRuntime(2588):     at android.view.ViewGroup.requestFocus(ViewGroup.java:976)
08-02 11:47:54.256: ERROR/AndroidRuntime(2588):     at android.view.ViewGroup.onRequestFocusInDescendants(ViewGroup.java:1020)
08-02 11:47:54.256: ERROR/AndroidRuntime(2588):     at android.view.ViewGroup.requestFocus(ViewGroup.java:979)
08-02 11:47:54.256: ERROR/AndroidRuntime(2588):     at android.view.ViewGroup.onRequestFocusInDescendants(ViewGroup.java:1020)
08-02 11:47:54.256: ERROR/AndroidRuntime(2588):     at android.view.ViewGroup.requestFocus(ViewGroup.java:976)
08-02 11:47:54.256: ERROR/AndroidRuntime(2588):     at android.view.ViewGroup.onRequestFocusInDescendants(ViewGroup.java:1020)
08-02 11:47:54.256: ERROR/AndroidRuntime(2588):     at android.view.ViewGroup.requestFocus(ViewGroup.java:979)
08-02 11:47:54.256: ERROR/AndroidRuntime(2588):     at android.view.View.requestFocus(View.java:3513)
08-02 11:47:54.256: ERROR/AndroidRuntime(2588):     at android.view.View.requestFocus(View.java:3491)
08-02 11:47:54.256: ERROR/AndroidRuntime(2588):     at android.widget.TabHost.setCurrentTab(TabHost.java:334)
08-02 11:47:54.256: ERROR/AndroidRuntime(2588):     at android.widget.TabHost.addTab(TabHost.java:213)
08-02 11:47:54.256: ERROR/AndroidRuntime(2588):     at com.organizer.Organizer.onCreate(Organizer.java:25)
08-02 11:47:54.256: ERROR/AndroidRuntime(2588):     at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
08-02 11:47:54.256: ERROR/AndroidRuntime(2588):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2444)
08-02 11:47:54.256: ERROR/AndroidRuntime(2588):     ... 11 more
08-02 11:47:54.476: INFO/Process(62): Sending signal. PID: 2588 SIG: 3
08-02 11:47:54.476: INFO/dalvikvm(2588): threadid=7: reacting to signal 3
08-02 11:47:54.476: ERROR/dalvikvm(2588): Unable to open stack trace file '/data/anr/traces.txt': Permission denied
08-02 11:48:01.446: INFO/dalvikvm(2588): Debugger has detached; object registry had 306 entries
08-02 11:48:02.466: DEBUG/ddm-heap(2588): Got feature list request
  • 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-16T02:25:51+00:00Added an answer on May 16, 2026 at 2:25 am

    What sdk version are you using to build the project? If it is above 6 you must make sure you are not using parts of the sdk that has been added after version 6. I’m asking since it seams like you’ve stepped down the target version from 8 (2.2)

    If this does not help, maybe you can post the complete stack trace which might give other clues.

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

Sidebar

Related Questions

No related questions found

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.