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

  • Home
  • SEARCH
  • 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 3442088
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T08:37:43+00:00 2026-05-18T08:37:43+00:00

I am new to Android and I don’t know much about Android. Well I

  • 0

I am new to Android and I don’t know much about Android. Well I have created a layout named button-layout.xml and the very firstly I added a relative layout to and and named it too button-layout.

What happens is that it created R.java and crated a reference to my layout with name public static final int button-layout=0x7f060000; as you people know that you can not use – in your variable name as it is illegal.

Now I want to clean my R.java do any body knows solution of this problem?

Pasting my code below
button-layout.xml

    <?xml version="1.0" encoding="UTF-8"?>
<RelativeLayout android:layout_width="fill_parent" android:layout_height="fill_parent"
    xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/button-layout">
    <LinearLayout android:id="@+id/button-layout"
        android:layout_height="wrap_content" android:layout_width="fill_parent">
        <TextView android:id="@+id/TextView01"
            android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="First Name"></TextView>
        <EditText android:id="@+id/EditText01"
            android:layout_width="wrap_content" android:layout_height="wrap_content" android:width="100px"></EditText>
    </LinearLayout>
    <LinearLayout android:id="@+id/LinearLayout02"
        android:layout_below="@id/LinearLayout01" android:layout_width="wrap_content"
        android:layout_height="wrap_content">
        <TextView android:id="@+id/TextView02"
            android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Last Name"></TextView>
        <EditText android:id="@+id/EditText02"
            android:layout_width="wrap_content" android:layout_height="wrap_content" android:width="100px"></EditText>
    </LinearLayout>
    <LinearLayout android:id="@+id/LinearLayout03"
        android:layout_below="@id/LinearLayout02" android:layout_width="wrap_content"
        android:layout_height="wrap_content" android:layout_centerInParent="true">
        <Button android:id="@+id/Button01"
            android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Submit"></Button>
    </LinearLayout>
</RelativeLayout>

R.java

/* AUTO-GENERATED FILE.  DO NOT MODIFY.
 *
 * This class was automatically generated by the
 * aapt tool from the resource data it found.  It
 * should not be modified by hand.
 */

package com.geniteam.mytest;

public final class R {
    public static final class attr {
    }
    public static final class color {
        public static final int blue=0x7f050000;
    }
    public static final class drawable {
        public static final int golden_gate=0x7f020000;
        public static final int icon=0x7f020001;
    }
    public static final class id {
        public static final int Button01=0x7f060008;
        public static final int Button02=0x7f060010;
        public static final int EditText01=0x7f060003;
        public static final int EditText02=0x7f060006;
        public static final int LinearLayout01=0x7f060001;
        public static final int LinearLayout02=0x7f060004;
        public static final int LinearLayout03=0x7f060007;
        public static final int RelativeLayout01=0x7f06000e;
        public static final int TextView01=0x7f060002;
        public static final int TextView02=0x7f060005;
        public static final int backbutton=0x7f060014;
        public static final int btn_FNname=0x7f060011;
        public static final int btn_cancel=0x7f06000c;
        public static final int btn_shahzad=0x7f060012;

public static final int button-layout=0x7f060000; //here is error

        public static final int editFirstName=0x7f060016;
        public static final int editLastName=0x7f060017;
        public static final int entry=0x7f06001a;
        public static final int firstName=0x7f060015;
        public static final int image=0x7f06000a;
        public static final int label=0x7f060019;
        public static final int lastName=0x7f060018;
        public static final int layout_root=0x7f060009;
        public static final int layout_shahzad=0x7f06000d;
        public static final int ok=0x7f06001b;
        public static final int relative_layout=0x7f060013;
        public static final int text=0x7f06000b;
        public static final int txt_label=0x7f06000f;
    }
    public static final class layout {
        public static final int abc=0x7f030000;
        public static final int custom_dialog=0x7f030001;
        public static final int frame_layout=0x7f030002;
        public static final int layout_shahzad=0x7f030003;
        public static final int main=0x7f030004;
        public static final int next_screen=0x7f030005;
        public static final int relative_layout=0x7f030006;
        public static final int relative_test_layout=0x7f030007;
    }
    public static final class string {
        public static final int app_name=0x7f040000;
        public static final int hello=0x7f040001;
        public static final int hello_new=0x7f040002;
    }
}
  • 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-18T08:37:44+00:00Added an answer on May 18, 2026 at 8:37 am

    The R.java file is automatically generated by resource compiler (AAPT). So every time you make changes to your project, and save, the R.java file is rebuilt.

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

Sidebar

Related Questions

I'm new to Android's NDK and I don't understand the differences between static and
I am new to Android programming. I have installed the Eclipse and Android SDK.
I am new to Android development and have been following the tutorials available on
I have a thread in java/Android like this: Handler handler = new Handler() {
New to xml. Looking for XPath to search a xml file with python ElementTree
Being new to test based development, this question has been bugging me. How much
I'm new to Java/Eclipse/Android, so this is probably an easy (if not stupid) question:
I am an iphone application developer, all iphones have very similar Operating systems, and
i am quite new to android and i was wondering how i could go
I'm new to Android development, and I was wondering if anyone knew either how

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.