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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T01:20:03+00:00 2026-05-25T01:20:03+00:00

I’m getting overly frustrated with this issue. First of all, this did work fine

  • 0

I’m getting overly frustrated with this issue. First of all, this did work fine with no issues, I have no idea why I’m now getting this error.

The application runs fine on my phone (v2.3.4) but not on one emulator (1.6 > 2.3)

The error I’m getting is ‘NullPointerException’ immediately after I load the application. Heres the DDMS

08-24 21:10:11.706: WARN/dalvikvm(423): threadid=1: thread exiting with uncaught exception (group=0x40015560)
08-24 21:10:11.726: ERROR/AndroidRuntime(423): FATAL EXCEPTION: main
08-24 21:10:11.726: ERROR/AndroidRuntime(423): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.myapp.app/com.myapp.app.SplashActivity}: java.lang.NullPointerException
08-24 21:10:11.726: ERROR/AndroidRuntime(423):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1622)
08-24 21:10:11.726: ERROR/AndroidRuntime(423):     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1638)
08-24 21:10:11.726: ERROR/AndroidRuntime(423):     at android.app.ActivityThread.access$1500(ActivityThread.java:117)
08-24 21:10:11.726: ERROR/AndroidRuntime(423):     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:928)
08-24 21:10:11.726: ERROR/AndroidRuntime(423):     at android.os.Handler.dispatchMessage(Handler.java:99)
08-24 21:10:11.726: ERROR/AndroidRuntime(423):     at android.os.Looper.loop(Looper.java:123)
08-24 21:10:11.726: ERROR/AndroidRuntime(423):     at android.app.ActivityThread.main(ActivityThread.java:3647)
08-24 21:10:11.726: ERROR/AndroidRuntime(423):     at java.lang.reflect.Method.invokeNative(Native Method)
08-24 21:10:11.726: ERROR/AndroidRuntime(423):     at java.lang.reflect.Method.invoke(Method.java:507)
08-24 21:10:11.726: ERROR/AndroidRuntime(423):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
08-24 21:10:11.726: ERROR/AndroidRuntime(423):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
08-24 21:10:11.726: ERROR/AndroidRuntime(423):     at dalvik.system.NativeStart.main(Native Method)
08-24 21:10:11.726: ERROR/AndroidRuntime(423): Caused by: java.lang.NullPointerException
08-24 21:10:11.726: ERROR/AndroidRuntime(423):     at com.myapp.app.SplashActivity.onCreate(SplashActivity.java:43)
08-24 21:10:11.726: ERROR/AndroidRuntime(423):     at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
08-24 21:10:11.726: ERROR/AndroidRuntime(423):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1586)
08-24 21:10:11.726: ERROR/AndroidRuntime(423):     ... 11 more

OK, so I look up what caused the problem (08-24 21:10:11.726: ERROR/AndroidRuntime(423): at com.myapp.app.SplashActivity.onCreate(SplashActivity.java:43))

Here is my onCreate:

    @Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.welcome);


    Button playBtn = (Button) findViewById(R.id.playBtn);
    playBtn.setOnClickListener(this);
    Button settingsBtn = (Button) findViewById(R.id.settingsBtn);
    settingsBtn.setOnClickListener(this);
    Button rulesBtn = (Button) findViewById(R.id.rulesBtn);
    rulesBtn.setOnClickListener(this);
    Button exitBtn = (Button) findViewById(R.id.exitBtn);
    exitBtn.setOnClickListener(this);
}

Line 43 is the last one: exitBtn.setOnClickListener(this);

This is handled later on in the app using a switch statement for each button, the only code for the exit button is ‘finish();’ but it crashes ‘onCreate’ not onClick.

This is making no sense to me, this used to work fine and I haven’t changed the code relating to this since it previously worked. Also, the exit button is set up exactly the same as all the other buttons (in src and layout files), so why would it crash when it gets to the exit button? As I said, this works OK on my cyn7 device but not on any of the emulators (it did)

This app has taken a massive amount of work to get it to this point, I was just doing final tests when this began.. so infuriating!

Can anyone please offer any suggestions to fix or even as to why this may happen?

EDIT: OK, this is really strange. I commented out the Exit button. Now my ‘Play’ button does nothing (even in DDMS it shows up nothing) the settings up OK and the Rules crashes, with the same error for the Rules activity on a setOnClickListener(this). Which makes no sense as the settings activity also has a ‘setOnClickListener’. What is going on?!

  • 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-25T01:20:03+00:00Added an answer on May 25, 2026 at 1:20 am

    Sounds like a corrupt worksapce. Android in Eclipse sometimes gets the autogenerated resource files out of sysnc with the actual layout. As Xion mentioned, a clean and rebuild will fix this via Project -> Clean… -> Clean all projects. Before doing this, ensure that Project -> Build Automatically is ticked.

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

Sidebar

Related Questions

I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
this is what i have right now Drawing an RSS feed into the php,
This could be a duplicate question, but I have no idea what search terms
I have a jquery bug and I've been looking for hours now, I can't
I have this code to decode numeric html entities to the UTF8 equivalent character.
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I have this code: - (void)parser:(NSXMLParser *)parser foundCDATA:(NSData *)CDATABlock { NSString *someString = [[NSString
I have a text area in my form which accepts all possible characters from
I have a .ini file as follows: [playlist] numberofentries=2 File1=http://87.230.82.17:80 Title1=(#1 - 365/1400) Example
link Im having trouble converting the html entites into html characters, (&# 8217;) i

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.