1

Possible Duplicate:
Developing for Android in Eclipse: R.java not generating

Im using Ubuntu 12.04 with Eclipse Indigo (I downloaded classic, and it poped up with that on the splash screen, so I guess thats it). I am trying to use the Android SDK with it. I downloaded all the SDK's possible from the interface, then added the Eclipse plugin. I created a project to mess around with Android stuff, and there are two errors. One error I fixed. The other was something like, "R.java does not exist". I Googled it, and found other Stack Overflow questions similar to this one. I made a new one, because all the answers to the other questions didnt work. I tried cleaning my workspace and my project, I tried reinstalling the plugin and the SDK. Nothing worked. Is there anything Im missing to have Eclipse generate R.java? I am also using the 32-bit version of Ubuntu, if that makes a differece.

Community
  • 1
  • 1
pjrader1
  • 491
  • 7
  • 22
  • please search on google and on Stackoverflow before posting a question. This question has been asked **a lot**. – Ahmad Sep 18 '12 at 22:59

2 Answers2

2

You failed to actually include any code in your question, so we cannot help to verify whether or not it is correct.

Assuming your Java code is correct, most likely your cause is an error in a resource or your AndroidManifest.xml file that is preventing R.java from being regenerated. To figure out what is going on:

  1. Look for red X marks in the Package Explorer for resources or the manifest
  2. Look in the Console for error messages
  3. Look in the Problems view for error messages
CommonsWare
  • 986,068
  • 189
  • 2,389
  • 2,491
  • 1
    I did not edit any code whatsoever. It was just the default code that Eclipse makes for you. – pjrader1 Sep 18 '12 at 22:54
  • @cakeisajoke: Your question suggests strongly that you edited the code ("One error I fixed"). – CommonsWare Sep 18 '12 at 22:57
  • Yes I did say that. That error was an error in the syntax of AndroidManifest.xml. There was no double quote at the end of one of the nodes. – pjrader1 Sep 18 '12 at 23:09
  • I just created a new project. I looked in the manifest and found that (maybe, I dont know for sure if this was the error): 1) My target platform was the same version as required SDK version 2)I still had the default com.example.____ for a namespace thing I created a new project, and didnt repeat the things I did on any other project. It worked perfectly, and R.java is being genereated! – pjrader1 Sep 18 '12 at 23:11
0

Try the following to see if it helps

  • right click on the project
  • select Android tools
  • select Fix Project Properties
sharadendu sinha
  • 827
  • 4
  • 10