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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T06:59:46+00:00 2026-05-16T06:59:46+00:00

Logcat 08-17 06:37:22.264: ERROR/AndroidRuntime(1090): java.lang.RuntimeException: Unable to start activity ComponentInfo{one.two/one.two.Booking}: java.lang.NullPointerException 08-17 06:37:22.264: ERROR/AndroidRuntime(1090):

  • 0

Logcat

08-17 06:37:22.264: ERROR/AndroidRuntime(1090): java.lang.RuntimeException: Unable to start activity ComponentInfo{one.two/one.two.Booking}: java.lang.NullPointerException
08-17 06:37:22.264: ERROR/AndroidRuntime(1090):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2268)
08-17 06:37:22.264: ERROR/AndroidRuntime(1090):     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2284)
08-17 06:37:22.264: ERROR/AndroidRuntime(1090):     at android.app.ActivityThread.access$1800(ActivityThread.java:112)
08-17 06:37:22.264: ERROR/AndroidRuntime(1090):     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1692)
08-17 06:37:22.264: ERROR/AndroidRuntime(1090):     at android.os.Handler.dispatchMessage(Handler.java:99)
08-17 06:37:22.264: ERROR/AndroidRuntime(1090):     at android.os.Looper.loop(Looper.java:123)
08-17 06:37:22.264: ERROR/AndroidRuntime(1090):     at android.app.ActivityThread.main(ActivityThread.java:3948)
08-17 06:37:22.264: ERROR/AndroidRuntime(1090):     at java.lang.reflect.Method.invokeNative(Native Method)
08-17 06:37:22.264: ERROR/AndroidRuntime(1090):     at java.lang.reflect.Method.invoke(Method.java:521)
08-17 06:37:22.264: ERROR/AndroidRuntime(1090):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:782)
08-17 06:37:22.264: ERROR/AndroidRuntime(1090):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:540)
08-17 06:37:22.264: ERROR/AndroidRuntime(1090):     at dalvik.system.NativeStart.main(Native Method)
08-17 06:37:22.264: ERROR/AndroidRuntime(1090): Caused by: java.lang.NullPointerException
08-17 06:37:22.264: ERROR/AndroidRuntime(1090):     at one.two.Booking.onCreate(Booking.java:50)
08-17 06:37:22.264: ERROR/AndroidRuntime(1090):     at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1123)
08-17 06:37:22.264: ERROR/AndroidRuntime(1090):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2231)

Booking.java

public void onCreate(Bundle savedInstanceState)
    {
        super.onCreate(savedInstanceState);
        db = new DBAdapter(this);
        this.setContentView(R.layout.booking);
        txtArrivalTime = (TextView) findViewById(R.id.txtArrivalTime); // Member assignment
        txtFerry = (TextView) findViewById(R.id.txtFerry);
        txtStatus = (TextView) findViewById(R.id.txtStatus);
        txtDestination = (TextView) findViewById(R.id.txtDestination);
        colourSpinner = (Spinner) findViewById(R.id.myspinner); // Member assignment
        Button btnBook = (Button) findViewById(R.id.btnBook);
        db.open();
        fillData();
        db.close();
        colourSpinner.setOnItemSelectedListener(new MyOnItemSelectedListener());
        b = this.getIntent().getExtras();
        s = b.getString("DEFAULTTEXT");      

        btnBook.setOnClickListener(new MyOnClickListener());


    }

Line 50 is s = b.getString(“DEFAULTTEXT”);

Thank you.

  • 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-16T06:59:46+00:00Added an answer on May 16, 2026 at 6:59 am

    Instead of this:

    b = this.getIntent().getExtras();
    s = b.getString("DEFAULTTEXT"); 
    

    Use getStringExtra(String)

    s = this.getIntent().getStringExtra("DEFAULTTEXT");
    

    The bundle you get from getExtras() is null, hence the exception

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

Sidebar

Related Questions

i got this error in the logcat 06-21 11:58:27.275: E/AndroidRuntime(404): java.lang.RuntimeException: Unable to start
I get this error message in LogCat: 06-25 15:17:34.495: E/AndroidRuntime(5891): java.lang.RuntimeException: Unable to start
Update 2 Logcat: 03-02 19:03:47.616: E/AndroidRuntime(881): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{TheTask}: java.lang.InstantiationException: .TheTask
The logcat error: 08-24 11:16:19.760: ERROR/AndroidRuntime(6254): FATAL EXCEPTION: main 08-24 11:16:19.760: ERROR/AndroidRuntime(6254): java.lang.RuntimeException: Unable
Logcat: 06-28 22:21:11.031: E/AndroidRuntime(1282): java.lang.IllegalStateException: The content of the adapter has changed but ListView
I am getting this LogCat: 06-22 15:30:53.731: E/AndroidRuntime(2389): java.lang.NumberFormatException: Invalid float: null 06-22 15:30:53.731:
LOGCAT 04-03 20:59:46.189: E/AndroidRuntime(362): android.content.res.Resources$NotFoundException: String resource ID #0x0 04-03 20:59:46.189: E/AndroidRuntime(362): at android.content.res.Resources.getText(Resources.java:201)
My Logcat 08-06 01:27:34.874: ERROR/AndroidRuntime(721): Uncaught handler: thread main exiting due to uncaught exception
I have got this logcat error more then one time. This time I started
Here is the logcat: 01-15 16:06:03.622: ERROR/AndroidRuntime(22300): Uncaught handler: thread main exiting due to

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.