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

  • Home
  • SEARCH
  • 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 5937899
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T15:36:28+00:00 2026-05-22T15:36:28+00:00

I trying to debug code on my first Android program. I started using the

  • 0

I trying to debug code on my first Android program. I started using the regular println and it worked in the earlier main(onCreate) method, showing the results in LogCat. However, it doesn’t seem to work below, so then I started trying to work out Log.i/Log.d to no sucess. I’m basically trying to see if the program actually runs the below method – although no print statements are produced in the LogCat, I think the code is actually running as when I hit the “new” or “exit”button on my app, it seems to fo to the correct place in the case statement and runs finish();

Any help with would be really appreciated in getting something printed to LogCat, so I can see what’s going on.

Thank you

Ed Ryan


 public void onClick(final View v) {

        System.out.println("Here in  - onClick");
        switch (v.getId()) {
        case R.id.about_button:
           System.out.println("Here in  - onClick1");
           Intent i = new Intent(this, About.class);
           startActivity(i);
           break;
        case R.id.new_button:
            System.out.println("Here in  - onClick2");
            finish();
           //openNewGameDialog();
           break;
        case R.id.exit_button:
            Log.i("onDisabled","info");
            Log.d(TAG, "onDisabled");
            System.out.println("Here in  - onClick3");
           finish();
           break;
        }
     }


}//end class



  • 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-22T15:36:28+00:00Added an answer on May 22, 2026 at 3:36 pm

    I’ve experienced this while using LogCat within Eclipse.
    This happens when the device drops off or loses focus or when you’re debugging using 2 or more different devices/emulators.

    Try the following:

    1. Go to the DDMS perspective and double-click the application that you’re debugging or at least the device. You should see the LogCat tab flood with the new messages.
    2. Remove all devices except the one you’re working with at the moment.
    3. Try just using the Log.* functions again.
    4. Set the LogCat filter to Debug or Verbose.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

No related questions found

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.