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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T18:37:33+00:00 2026-06-01T18:37:33+00:00

I am practicing from the book Hello,Android ed3.There is an example code on creating

  • 0

I am practicing from the book Hello,Android ed3.There is an example code on creating an action button to display ‘About’ the game.I have edited all the necessary xml files.I am getting error in the following code.logcat is showing nullpointer exception in line 10: about.Button.setClickListener(this).Please help.Also i have been unable to understand ‘this’ parameter.Any hep?

public class Sudoku extends Activity implements OnClickListener {
private static final String TAG = "Sudoku";
   /** Called when the activity is first created. */
   @Override
   public void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.main);
      // Set up click listeners for all the button
      View aboutButton = findViewById(R.id.about_button);
      aboutButton.setOnClickListener(this);

   }

   public void onClick(View v) {
          switch (v.getId()) {
          case R.id.about_button:
             Intent i = new Intent(this, About.class);
             startActivity(i);
             break;
    }

}
}

  • 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-01T18:37:34+00:00Added an answer on June 1, 2026 at 6:37 pm

    Looks like you dont have “about_button” button in the xml file. Did you give the same name for the button in xml?

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

Sidebar

Related Questions

In attempt to learn Hadoop, I am practicing unsolved programming questions from the book
I'm practising grid view from the book, Beginning android 2, I typed this xml
I'm practicing drawing polyline on the Map. I've adopted Sample code from download here.
I have been quite comfortable with windows-services, I have been practicing since from last
While practicing the jxl API, i cant extract details from certain Excel sheet its
I've been doing some exercises from a book and I'm wondering if you could
I'm using g++ on fedora linux 13. I'm just practicing some exercises from my
I am learning ruby and practicing it by solving problems from Project Euler .
I'm practicing writing MVC applications. I have a Mastermind game, that I would like
For practicing purposes, I’m about to create a new ASP.NET MVC 3.0 application. My

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.