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

The Archive Base Latest Questions

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

All layouts and button references mentioned in my java files all have warnings on

  • 0

All layouts and button references mentioned in my java files all have warnings on them. The warning is always, button or layout cannot be resolved to a variable. I asked other developers for help on this and I was asked to remove the import android.R;. I was told it’s not needed.

I did this and now all the R’S throughout my project have that same warning, I seemed to have traded one problem for another.

is there a way I can manually change the lines in the R.java file in gen/ because all layouts are in place in the layout folders and all buttons in the xml files have android:id:@+id/ I don’t know what I have to do for Java to read its references so I can get past this hump.

Manifest

<uses-sdk android:minSdkVersion="8" />
<uses-permission android:name="android.permission.CALL_PHONE"/>

<application
    android:icon="@drawable/ic_launcher"
    android:label="@string/app_name" >
    <activity
        android:name=".ZohanActivity"
        android:label="@string/app_name" >
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />
            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
       </activity>  
        <activity
        android:name=".MacAttack"
        android:label="@string/app_name" >
        </activity>
        <activity
        android:name=".ConsultationReq"
        android:label="@string/app_name" >
        </activity>
</application>

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

    First of all are you sure it’s a warning? or is it an error?
    Secondly, never modify the R file, because it is generated automatically. So all your modifications will be lost.

    I would have to guess it’s an error and not a warning. Here is what I propose to you:

    1. Clean your project and rebuild
    2. right-click the error, click on quick fix and choose “import package_name.R”
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I always have trouble with Java layouts, but the main thing bugging me now
Apparently I've done something I'm not aware of All my classes now have warnings
Short Question I have a 50dip by 40dip button in my Android XML layout.
I have an MXML file, which references an external script file for all its
I have various XML layouts. In all of those layouts I have buttons, but
I have custom coded layout to hold all the childs. Here is the code:
I have a complex button which is made up of some layouts and Imagebuttons
I have a layout that is three linear layouts. The top has some icons
With ruby on rails, the scaffolding creates layouts for all the controllers. If I
Is it possible to do template layouts which you can assign to all your

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.