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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T19:53:47+00:00 2026-06-18T19:53:47+00:00

am very much a newbie when it comes to android development so bear with

  • 0

am very much a newbie when it comes to android development so bear with me. Im currently using Windows 8 / Eclipse.

My issue is, the findViewById function seems to have gone mad, although I could very well be using it wrongly.

The app was working fine, then I ‘dropped’ a few new TextViews on the page which seems to totally confuse it.

The findViewById function now either finds the wrong control completely, or doesnt find anything at all (and will return null). I’ve checked my activity_main.xml file and the id’s are still correct.

Can anyone help?

This is a typical example of my usage:

public void toggleButtonNetwork_Click(View v) {
  ToggleButton tb = (ToggleButton) this.findViewById(R.id.toggleButtonNetwork);//did work, now does not work!
}

The only insight I may add is that my R.java file looked like this when it was working:

...
    public static final class id {
      public static final int menu_settings=0x7f070004;
      public static final int textViewGPS=0x7f070003;
      public static final int textViewNetwork=0x7f070001;
      public static final int toggleButtonGPS=0x7f070002;
      public static final int toggleButtonNetwork=0x7f070000;
    }
...

and now looks like this (broken):

public static final class id {
    public static final int menu_settings=0x7f070006;
    public static final int textView1=0x7f070004;
    public static final int textView2=0x7f070005;
    public static final int textViewGPS=0x7f070002;
    public static final int textViewNetwork=0x7f070003;
    public static final int toggleButtonGPS=0x7f070000;
    public static final int toggleButtonNetwork=0x7f070001;
}
  • 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-18T19:53:49+00:00Added an answer on June 18, 2026 at 7:53 pm

    This is a quite common problem. Try and invoke the Project/Clean... on your project. It sometimes happens that the automatic generating of the R classes goes wrong and this will force them to be rebuilt.

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

Sidebar

Related Questions

I'm very much a newbie when it comes to all this so forgive my
I'm very much a perl newbie, so bear with me. I was looking for
I am very much an Android newbie and I have built a simple RSS
I get very much confused when it comes to pointers. I want to know
My question is very much like Getting the return value of a PL/SQL function
I have a C# background. I am very much a newbie to a low-level
Very much a newbie with F#, can't seem to get my googler to work
Very much a newbie question here but I cannot find a clear answer on
I'm very much newbie to VS Addins. Although, I subscribed to DocumentEvent.DocumentOpened. But additionally,
as a very much of a newbie in Django/python world I fail to find

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.