Example code:
setContentView(R.layout.main);
Error:
R cannot be resolved
There\'s this error in all the class
Check if your R is generated properly inside the "gen" folder.Check if there are any libraries missing which are added as dependencies from project properties. Also make sure that there are no issues which is preventing the app from generating R file. Go to Window > Show view> Problems and it will show you whats missing.