Error in all the classes files: R cannot be resolved

前端 未结 5 527
深忆病人
深忆病人 2021-01-29 10:34

Example code:

setContentView(R.layout.main);

Error:

R cannot be resolved

There\'s this error in all the class

5条回答
  •  我在风中等你
    2021-01-29 11:15

    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.

提交回复
热议问题