Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » invalid reference to 'R' object in new project (Juno with Android 2.1 sdk installed on Ubuntu 12.04)
invalid reference to 'R' object in new project [message #957935] Thu, 25 October 2012 12:05 Go to previous message
Ruud Naastepad is currently offline Ruud Naastepad
Messages: 2
Registered: October 2012
Junior Member
I just installed Eclipse Juno with Android 2.1 SDK on an Ubuntu 12.04 system with Java 1.6.0_35 JDK.

When I create a new Android Application project a source file MainActiviy.java is created automatically with reference to an object named 'R'. Eclipse reports an error there: 'R cannot be resolved to a variable'. If I right click on R looking for its declaration I get error 'the source attachment does not contain the source for the file R.class. Then it says you can change the source attachment by clicking change attached source. When I do so and point the the file android.jar that contains the source code it still doesn't show.

What is wrong?

(I had Eclipse with the same configuration installed under Windows and there this problem didn't arise (right clicking on R shows the sourcecode for class R and no error is reported in the first place about R.)
 
Read Message
Read Message
Read Message
Previous Topic:start tomcat in eclipse ...
Next Topic:how to install patch for HTTP preview on mac
Goto Forum:
  


Current Time: Tue May 21 17:07:44 EDT 2013

Powered by FUDForum. Page generated in 0.01580 seconds