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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T22:54:09+00:00 2026-06-13T22:54:09+00:00

This is a continuation off of Why is my layout unable to be resolved?

  • 0

This is a continuation off of Why is my layout unable to be resolved? (Android/Java) (read the comments on the 1st answer) because I need to post a large amount of code, and doing that in a comment doesn’t work.

package scouting.form;

import android.os.Bundle;
import android.app.Activity;
import android.view.Menu;
import android.view.View;
import android.widget.Button;
import android.widget.CheckBox;
import android.widget.EditText;

public class Scouting extends Activity {

    CheckBox sground,strough,shigh,dground,dtrough,dhigh;
    Button logout,clr;
    EditText TeamNum;
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_scouting);
        TeamNum=(EditText) findViewById(R.id.TBTeamNum);
        sground=(CheckBox) findViewById(R.id.CBSGround);
        dground=(CheckBox) findViewById(R.id.CBDGround);
        strough=(CheckBox) findViewById(R.id.CBSTrough);
        dtrough=(CheckBox) findViewById(R.id.CBDTrough);
        shigh=(CheckBox) findViewById(R.id.CBSHigh);
        dhigh=(CheckBox) findViewById(R.id.CBDHigh);
        logout=(Button) findViewById(R.id.Logout);
        logout.setOnClickListener(new View.OnClickListener() {
            public void onClick(View v) {
                finish();
            }
        });
        clr=(Button) findViewById(R.id.CLREntries);
        clr.setOnClickListener(new View.OnClickListener() {
            public void onClick(View v) {
                sground.setActivated(false);
                strough.setActivated(false);
                shigh.setActivated(false);
                dground.setActivated(false);
                dtrough.setActivated(false);
                dhigh.setActivated(false);
            }
        });
    }
    @Override public void onBackPressed(){}
    @Override
    public boolean onCreateOptionsMenu(Menu menu) {
        getMenuInflater().inflate(R.menu.activity_scouting, menu);
        return true;
    }
}

Every line with “R.xxx.xxx” says “R cannot be resolved as a variable”.

I tried doing a clean, and since it’s almost definitely a glitch in eclipse, I tried importing android.R, saving and cleaning, then un-importing android.R(importing android.R breaks everything dealing with it, but I did that intentionally), saving, and cleaning, to hopefully “refresh” it to make the glitch go away. I also tried restarting Eclipse. Still having this bug.

  • 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-13T22:54:10+00:00Added an answer on June 13, 2026 at 10:54 pm

    I fixed it! So I had this file with the name “Gangam Style.mp3” in the raw folder(I have no clue how it got there). I noticed an error saying that was an invalid name. I went into the folder and removed that file, and all of the errors went away. I guess having a bad file kind of messed with Eclipse and for whatever reason, it couldn’t find R.

    To anyone else who gets the error that R can’t be resolved, make sure you aren’t importing “android.R” and make sure you don’t have any file with an invalid name in any of your folders.

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

Sidebar

Related Questions

In continuation off of this question , what are the PHP statements I need
This is a continuation of this question: Original Question (SO) The answer to this
This is a continuation of the post How does one access a method from
This is in continuation with my previous post. communcation between racket program and python
This is continuation of my previous question Android: Music Player gets started itself after
This is in continuation with this -> Read and Write to a file in
This post is an continuation of this post I have DlUser Class each object
A continuation from this question I need a SQL statement that returns the number
This is a continuation of the question Java rounded Swing JButton . I have
This question is in continuation of this post , I have tried installing Xerces-C

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.