NicMer
NicMer

Reputation: 23

Error with R.java class, layout no found but present in R.java

Well, first I'm sorry but my english is not very good because I'm French... I work on Eclipse on an android project (pong) So, I've a problem with an activity, when I write : setContentView(R.layout.menu); I have an error who say : menu cannot be resolved or is not a field The fact is... This is a file ! I went to the R.java and I see it, but the error don't disappear. (I have alredy clean and build the project many times, it still don't work) I have took some screens ;-)

http://imageshack.us/photo/my-images/4/erreurmenupong1.png/ (In the Menu.java) http://imageshack.us/photo/my-images/62/erreurmenupong2.png/ (In the R.java)

Upvotes: 0

Views: 193

Answers (2)

InflexCZE
InflexCZE

Reputation: 732

Delete "android.R" from your imports.

Upvotes: 1

Andre Yonadam
Andre Yonadam

Reputation: 1024

I had the same exact problem. I solved it buy making a new work space and importing all my android projects over there.

Upvotes: 0

Related Questions