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]> > > > 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

