问题描述:

The project worked fine for sudden I start getting the following message on Eclipse

layout cannot be resolved or is not a field

on this line: setContentView(R.layout.activity_comm);

and this: imageCodeProject.setImageResource(R.drawable.info);

i try this:

  1. close & open Eclipse again
  2. delete the R.java (and the Eclipse create a new one)
  3. restart the computer
  4. Project --> Clean
  5. right click on my project --> Android Tools --> Fix Project Properties

but nothing help

EDIT: and There is no error on xml files

网友答案:

There may be error in one of your xml files, because of that R.java is not getting created hence you are getting that error. check your xml files you will find error.

相关阅读:
Top