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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T05:57:38+00:00 2026-06-17T05:57:38+00:00

I understand that the R.java file is important for mostly a lot of functions

  • 0

I understand that the R.java file is important for mostly a lot of functions in android. So I learned that the way to gte around this is to Clean your project after creating a new android application project. But after a few cleans and you have a lot of code, the R.java file disappears and you are left with an error-ridden MainActivity.java file!

I HAVE NO ERROR IN MY XML FILES. And that is why I am really confused. The only error in my package/project folder is in the MainActivity.java

Any ideas how to get around this?

I am using Eclipse for making Android Applications, but more stable IDE suggestions for creating android applications would also be appreciated!

Here is my xml file:

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:orientation="vertical"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    >
<TextView
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:text="@string/Quote"
/>
<EditText
android:id="@+id/Quote"
android:inputType="text"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
/>
<Button
android:id="@+id/go"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="@string/press"
/>
<Button
android:id="@+id/genRan"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="@string/genRan"
/>
</LinearLayout>
  • 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-17T05:57:40+00:00Added an answer on June 17, 2026 at 5:57 am

    Build your project , R.java will be regenerated, If its still not generated, Clean project and check your XML files and code thoroughly if there is any error in resource xml files R.java will not be generated.

    Also check that have you import packagename.R in your imports or not?

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

Sidebar

Related Questions

I have problem compiling this java file. I cant understand what that problem is.
Does InputStreams and OutputStreams in Java close() on destruction? I fully understand that this
Please understand firstly that I fully understand that Java will return a String when
I have read up on it a bit and I understand that in java
We all know of sleep method available in java threads.. I understand that the
I'm a newbie on Java EE and got a problem that I don't understand
I understand that this question may be subjective, this is why I need an
What will be the most eficient way to split a file in Java ?
Unfortunately I have no experience with Java but it seems that in this case
Actually, the question is a bit broader. I know that javac compiles java file

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.