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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T03:44:28+00:00 2026-06-14T03:44:28+00:00

Well, my program has been working so far, staying compilable and everything, and I

  • 0

Well, my program has been working so far, staying compilable and everything, and I tried to add a sound to it, so I created a folder “raw”, and stuck in the mp3 file. Then I tried to use it, and everything started getting errors for whatever reason. I Ctrl+Z’d until it was back to before I tried adding sound. The program still error’d. I deleted the raw folder and there’s still errors[marked in the program below] Note that this is only 1 class from my program, there are others.

package scouting.form;

import android.R;//Don't use android.R here; use a fully qualified name for each usage instead - this one only comes up *sometimes...*
import android.os.Bundle;
import android.app.Activity;
import android.content.Intent;
import android.view.Menu;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;

public class Login extends Activity {

    Button login;
    EditText user;
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_login);//Error: activity_login cannot be resolved or is not a field
        login=(Button) findViewById(R.id.button1);//NO ERROR even though the next line has an error...
        user=(EditText) findViewById(R.id.editText1);//Error: editText1 cannot be resolved or is not a field
        login.setOnClickListener(new View.OnClickListener() {
            public void onClick(View v) {
                Intent openScouting = new Intent("com.cody.graham.SCOUTING");
                startActivity(openScouting);
            }
        });
    }

    @Override
    public boolean onCreateOptionsMenu(Menu menu) {
        getMenuInflater().inflate(R.menu.activity_login, menu);//Error: activity_login cannot be resolved or is not a field
        return true;
    }
}

I know that the layouts and menus are still there, they have been there the whole time, I can open the layouts and confirm that there is still an Edit Text box in the layout “activity_login” which is in the layout folder and the edit text box does have the line

android:id="@+id/editText1"

in it.

  • 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-14T03:44:30+00:00Added an answer on June 14, 2026 at 3:44 am

    See at the top?

    import android.R;//Don't use android.R here; use a fully qualified name for each usage instead - this one only comes up *sometimes...
    

    You should probably heed what that comment says. 😉 Remove the import for android.R, and it will use your project’s R file instead, which is where activity_login is.

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

Sidebar

Related Questions

Well I don't think that it's really important but since the program has to
We have a Perl program that ran well on all Windows platforms so far.
My app runs great in the simulator, and has been working great on device
I've been working on implementing an api in c#. The implementation is going well,
My program has been running fine, but I think I must have accidentally changed
I've been working on a Lucene document search program for the last few days
I have been working now for few days on a small C program which
I have a project I have been working on and all was going well
My indexoutofbounds issues has been solved but not my program compiles but prints out
I have used ajax auto completeextender in my program well its works fine no

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.