当前位置: 动力学知识库 > 问答 > 编程问答 >

java - Consultation regarding a mysterious message on Eclipse

问题描述:

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.

分享给朋友:
您可能感兴趣的文章:
随机阅读: