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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T14:58:24+00:00 2026-06-14T14:58:24+00:00

I simply tried to import a sample project in the project workspace of Eclipse

  • 0

I simply tried to import a sample project in the project workspace of Eclipse but without even touching the code, it gives huge number of errors all telling that R.java cannot be converted to a variable. But the file R.java is not present at all in the tree structure and I don’t know that where it has gone. Now when I am creating a new Android project, it again gives the same error in that new project as well. I face this problem too often and it is a great hurdle for me..

Can anybody please tell the cause and the solution to the problem?
Thanks in advance.

  • 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-14T14:58:25+00:00Added an answer on June 14, 2026 at 2:58 pm

    Some background: R.java is automatically generated from your project’s resources. When you add something like a layout or a drawable resource to a project, the Android SDK will compile that for you and attribute a resource ID to it, and the R.java class holds those IDs.

    Sometimes when importing a sample project, Eclipse fails (or takes long) to generate the R class based on the resources, and in the meantime you will see that as an error. If you try to fix the error using the auto import fixer (Ctrl+Shift+O), the problem will become worse because Eclipse will add import android.R to your file, which is not correct (remove it if you find this in any of your files).

    The solution in this case is usually to clean the project (Project | Clean) and build it again, and it should work just fine.

    Notice, however, that if you are seeing several error messages, the true cause of the problem might be hidden — if there is a syntax error in the XML for one of your resource files, for instance, that might prevent the SDK from generating the resources, which in turn prevents it from generating R.java. So check carefully to see if there are no error message about parse errors on XMLs, drawables, etc.

    Hope this helps.

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

Sidebar

Related Questions

I have tried notepad++ and eclipse but even then , it is showing me
I've tried many functions already, but I simply can't figure this out. The right
I've tried many variations of this command: idle.py -e filepath , but it simply
I've looked high and low, and tried all sorts of things, but it simply
I'd like to make a subclass of NSInputStream. Simply, I tried to code just
I have a multi-project Scala workspace in eclipse. I think I'm getting hosed by
I recently tried to import a file into my existing node.js project. I know
Firstly, I have tried the method given in official page of eclipse . But
I tried adding the static library to my project but it wouldnt work. Now,
Is there any command to create an eclipse workspace without actually launching eclipse ?

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.