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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T11:25:48+00:00 2026-06-08T11:25:48+00:00

I search for answer all day long, but when i try to get the

  • 0

I search for answer all day long, but when i try to get the table layout i am having null.
I found info that it may be another table layout with same name, but there is only one.
My .xml file :

my xml

and my code is here layout6 = (TableLayout)findViewById(R.id.shdslResultsTableLayout);
layout6.setVisibility(0);

always ends up with null pointer.
Please help.

  • 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-08T11:25:49+00:00Added an answer on June 8, 2026 at 11:25 am

    If findViewById() is returning a NPE, try some of these:

    • Clean the project via Project -> Clean… -> check your project -> OK
    • Ensure you have absolutely no spelling errors in the ID
    • Make sure the contentView is displaying the correct layout where the TableLayout exists
    • Make sure you setContentView before findViewById

    I’m assuming the 3rd option I’ve listed is most likely your problem.

    Re-cleaning the project may also help after each of these steps.

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

Sidebar

Related Questions

I have been trying to search answer for this, but all discussions that I
I've been search and I can't found an answer that works, I need to
There's probably a Google search that'll answer this question but for the life of
I have search all over the web but could not find answer to this
I have search all over Stack Overflow site but I can find an answer
all. I search the sites but can not find my answer, so I post
I've tried to search for this answer all morning, but with no luck, all
First of all, I did some search and no answer on stackoverflow/google provided me
I have tried to search for an answer in google, and this site, but
First of all I have done a search and can't find a specific answer

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.