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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T16:04:05+00:00 2026-05-25T16:04:05+00:00

It seems that the Android SDK doesn’t compile my android app correctly. After building

  • 0

It seems that the Android SDK doesn’t compile my android app correctly. After building an app, I sometimes get seemingly random exceptions. The error goes away if I comment out the offending code, rebuild, uncomment the code, then rebuild again.

For instance, this code gave me a NullPointerException:

playButton.setOnClickListener(new OnClickListener() {
public void onClick(View v) {
startActivityForResult(settings, PLAY_GAME);
}
});

There is nothing wrong this code! Yet adb logcat tells me it’s the cause of an exception.
Commenting out this code, rebuilding, uncommenting and rebuilding, makes the error go away.

What is going on?

This is making developing for android particularly frustrating.

Update: As I pointed out before, these are seemingly random errors that go away once I uncomment/recompile/comment/recompile. So I can’t reproduce the stacktrace. It was a NullPointerException if I remember correctly.

However, if it is indeed buggy programming, why is the app running fine now w/o ANY errors at all?

Whenever I make a significant change to the app (add a new resource, a new class, function, etc), old code that was working fine breaks. Why?

Update: Seriously guys, lay off on the hate. I feel like a stumbled on a Atheists vs Christian debate. Sorry to have insunated that android was at fault. Started a new question with the latest errors:

App Ran Fine, Now Breaking for Seemingly Unknown Reasons

  • 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-25T16:04:05+00:00Added an answer on May 25, 2026 at 4:04 pm

    No, as noted in several other places, sometimes the source and the bin get out of sync. I’ve noticed numerous times, specially when making changes to XML. The solution, for commandline users, is to remove the bin directory, and re-compile. Problem goes away.

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

Sidebar

Related Questions

I am using ANT to compile an Android app that I have built. It
It seems that android has enforced that a listview must have the name android:id=@android:id/list,
From another stackoverflow question, it seems that Android handles large bitmaps differently than other
It seems that I accidentally checked in my gen folder from an Android project
I have to admit that I'm new to Java and Android. db4o seems to
Seems that even after unchecking the option in the PyDev/Debug preferenecs pane to launch
I am developing an Android app that connects to the Facebook Open Graph via
I get the following errors when I try to compile any Android RenderScript sample
I have an app that seems downloadable to all phones except the HTC Sensation.
here is some sample code, it seems that it doesn't work for me. public

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.