Cloud to device/ Push Notification in Android

Hi I am trying to implement push notification using the documentation from google here http://developer.android.com/google/gcm/client.html. But I am not sure what to do about the R.layout.main, R.id.Dispay or any R.variable … how do I get these variables??

I am using 2.2.x

pls help. Thanks.

Those R represents resources which will be included in apk.
R is auto-generated file(Class).
When you add some resources under res directory,
then the R will be generated or updated under proj.android/gen/ directory.

IN the tutorial by google I am supposed to add the following lines in onCreate()

   setContentView(R.layout.main);
    mDisplay = (TextView) findViewById(R.id.display);

And it says R cannot be resolved… there is also R.id.view and a couple of others giving the error whereever R is mentioned I ma having an error… I have included all the headers.

then import R by add import com.company.yourProject.R

Oh. I had actually missed a step where I had to add a whole bunch of strings in the res/values/string.xml file and I also need to add main.xml and some more stuff. But now the app crashes and some error in application.cpp… not sure…