I was working on Android Studio for adding a short toast message.(I was making an Android Wear Application)
I couldn\'t know why this code has error on \'symbol R\'
If in your case in imports R is missing you Have to import R manually.
R
import .R;
Replace with your own package name.
In your code, R was not imported, therefore your Android Studio might got confused to find resources in your package.
Android Studio