1

I am currently busy with this turotial: http://www.androidhive.info/2012/10/android-push-notifications-using-google-cloud-messaging-gcm-php-and-mysql/

And im stuck at this line:

final int icon = R.mipmap.ic_launcher;

It cannot resolve symbol "R"

How can i import this symbol?

Alex Hakman
  • 62
  • 1
  • 8

2 Answers2

5

To import R class simply write:

import your_package_name.R;

Generally the R class automatically gets imported but in case if you have some error in any of your xml file then the R file doesn't get created.

Amit Upadhyay
  • 7,179
  • 4
  • 43
  • 57
0

check resources in your project, if you have an error in them, the R class can not be created and show error en java classes

Lcop
  • 101
  • 3