Try doing this,

In Eclipse, go to Project, and make sure Build Automatically is checked.
R.java should be generated as you are editing and saving the project. That
fixed the issue for me a while back.

Tope

On Fri, Jan 15, 2010 at 11:58 AM, Walt Armour <[email protected]> wrote:

> android.R and R are not the same.  One is the default resource class from
> android and the other is your application specific (generated) resource
> class.
>
> If someone is still having the issue I would guess that perhaps there is an
> error somewhere in their resource files (res/) that is causing generation of
> R to fail.
>
> On Mon, Jan 11, 2010 at 13:52, Miro <[email protected]> wrote:
>
>> I had the same problem. I closed all otehr projects and then removed
>> "import andorid.R" (inserted earlier to resolve the problem) and
>> suddenly it had no errors. ...mystery
>>
>> On Dec 16 2009, 2:45 am, Steve <[email protected]> wrote:
>> > I am also working through this example but ran into a different
>> > problem.  The lines:
>> >
>> >         mDateDisplay = (TextView) findViewById(R.id.dateDisplay);
>> >         mPickDate = (Button) findViewById(R.id.pickDate);
>> >
>> > give the error "R.idcan not beresolved".  R is never declared
>> > anywhere.  What is it supposed to be? Eclipse's suggestion is:
>> >
>> > public static Object id;
>> > or
>> > public static final String id = null;
>> >
>> > -Steve
>> >
>> > On Dec 15, 2:45 pm, Justin Anderson <[email protected]> wrote:
>> >
>> > > If you are using Eclipse you can do this quickly with the Ctrl+Shift+O
>> > > shortcut... It will automatically add missing imports and remove those
>> you
>> > > don't need.
>> >
>> > > ----------------------------------------------------------------------
>> > > There are only 10 types of people in the world...
>> > > Those who know binary and those who don't.
>> > > ----------------------------------------------------------------------
>> >
>> > > On Mon, Dec 14, 2009 at 10:04 AM, Waiter <[email protected]> wrote:
>> > > > ME TOO.
>> >
>> > > > I'm going through the tutorials one at a time. Very helpful and
>> > > > learning as I go.
>> >
>> > > > So, I need to import both the Textview and the Button, (and whatever
>> > > > else I'll be using)
>> >
>> > > > import android.widget.TextView;
>> > > > import android.widget.Button;
>> >
>> > > > Added this to the imports, worked like a champ.
>> >
>> > > > Thanks
>> >
>> > > > Waiter
>> >
>> > > > On Dec 10, 3:59 pm, "Lee $$$" <[email protected]> wrote:
>> > > > > Nevermind, already figured out what was wrong. As a note to
>> beginners,
>> > > > > always double-check that you are importing all the android
>> packages for
>> > > > the
>> > > > > tutorials. It will save you mountains of time and problems.
>> >
>> > > > > On Dec 9, 2009 11:58 PM, "LeeGiT" <[email protected]> wrote:
>> >
>> > > > > I am working through the tutorial for Hello Date Picker. I copied
>> the
>> > > > > code for the HelloDatePicker.java file but I keep getting syntax
>> error
>> > > > > on tokens for the 'int'. Here some code...
>> >
>> > > > > package com.example.hellodatepicker;
>> >
>> > > > > import android.app.Activity;
>> > > > > import android.os.Bundle;
>> > > > > import java.util.Calendar;
>> >
>> > > > > private TextView mDateDisplay; <====== Error Here - Syntax error
>> on
>> > > > > these tokens, delete these tokens.
>> > > > > private Button mPickDate;          <====== and here
>> >
>> > > > > private int mYear;                       <====== and here
>> > > > > private int mMonth;                    <====== and here
>> > > > > private int mDay;                        <====== and here.....
>> >
>> > > > > static final int DATE_DIALOG_ID = 0; <====== Error Here - Syntax
>> error
>> > > > > on these tokens, AnnotationName expected instead.
>> >
>> > > > > What is going on here? Is seems all the tutorials are based on
>> Android
>> > > > > 1.5 - 1.6....
>> >
>> > > > --
>> > > > You received this message because you are subscribed to the Google
>> > > > Groups "Android Beginners" group.
>> > > > To post to this group, send email to
>> [email protected]
>> > > > To unsubscribe from this group, send email to
>> > > > [email protected]<android-beginners%[email protected]>
>> <android-beginners%[email protected]<android-beginners%[email protected]>
>> >
>> > > > For more options, visit this group at
>> > > >http://groups.google.com/group/android-beginners?hl=en
>>
>> --
>> You received this message because you are subscribed to the Google
>> Groups "Android Beginners" group.
>>
>> NEW! Try asking and tagging your question on Stack Overflow at
>> http://stackoverflow.com/questions/tagged/android
>>
>> To unsubscribe from this group, send email to
>> [email protected]<android-beginners%[email protected]>
>> For more options, visit this group at
>> http://groups.google.com/group/android-beginners?hl=en
>>
>>
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Beginners" group.
>
> NEW! Try asking and tagging your question on Stack Overflow at
> http://stackoverflow.com/questions/tagged/android
>
> To unsubscribe from this group, send email to
> [email protected]<android-beginners%[email protected]>
> For more options, visit this group at
> http://groups.google.com/group/android-beginners?hl=en
>
>
-- 
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.

NEW! Try asking and tagging your question on Stack Overflow at
http://stackoverflow.com/questions/tagged/android

To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en

Reply via email to