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\'
The thing that finally did the trick for me was looking at the "event log" tab in Android Studio where I saw:
Frameworks detected: Android framework is detected in the project Configure
clicking on "Configure" set the AndroidManifest.xml as configuration-file of the project (identified it as "android") and only then all the "R" errors went away and I was able to compile & run.
Before doing that - all the actions I've tried such as: "clean", "rebuild" and restarting Android studios - didn't work.