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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T18:35:23+00:00 2026-06-02T18:35:23+00:00

My second book for Android programming Hello, Android by Ed Burnette. I’m using eclipse.

  • 0

My second book for Android programming Hello, Android by Ed Burnette. I’m using eclipse. The code matches the book and it matches the code downloaded from the website of the book. But I know I’m doing something wrong here. I added a bunch of breakpoints where I figure (mostly guessing) where the problem might be happening. What I’ve come to is that this line of code is the culprit (SudokuActivity.java line 21) You can download the entire code here
http://kbsoftware.dlinkddns.com/Sudoku.zip

aboutButton.setOnClickListener(this);

but I just can’t figure out why ? It must be the result of something I’m doing wrong somewhere else. I’ve deleted and recreated the avd and that made no difference so not it. I’m at a lost here.

public class SudokuActivity extends Activity implements OnClickListener {
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.main);

    View aboutButton = findViewById(R.id.about_button);
    aboutButton.setOnClickListener(this);
}    

I want to thank everyone who responded, it’s all fixed and working and I could not have done it without your help. I’ve learned more working on this problem then I would of in weeks if not months of problem free programming.

  • 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-06-02T18:35:26+00:00Added an answer on June 2, 2026 at 6:35 pm

    I downloaded your code and it runs correctly on my phone. So if your code is the same it should run.
    It seems that findViewById didn’t find the view and then calling a method on a null object caused the nullpointerexception.

    My dumb question: have you tried a project clean up? You can even try saving your classes, deleting the project and creating a new one.
    Hope it helps

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

Sidebar

Related Questions

The code that follows comes from p.58-61 of the book Android Developer's Cookbook. The
i have following problem from book introduction algorithm second edition by MIT university problem
An Android book I have states that using TextToSpeech.playEarcon() is preferable to playing audio
So, I'm reading this book: C++ GUI Programming with Qt 4, Second Edition by
I'm reading this book: The C Programming Language - By Kernighan and Ritchie (second
My experience in C is mostly from second edition of The C Programming language
Second question of the day but hopefully simple, I just need to change the
Referring second answer to question: How to convert from ASCII to Hex and vice
I'm learning android now, and i write some simple codes according to the book.
I have a problem in compiling a qt example from c++ GUI programming with

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.