|
Re: invalid reference to 'R' object in new project [message #959164 is a reply to message #957935] |
Fri, 26 October 2012 13:53 |
|
On 10/26/2012 07:42 AM, Ruud Naastepad wrote:
> 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.)
http://www.eclipse.org/forums/index.php/t/225513/
http://www.javahotchocolate.com/tutorials/android.html#r-java
Best of luck.
|
|
|
|
Powered by
FUDForum. Page generated in 0.10012 seconds