Marcus Johansson
Marcus Johansson

Reputation: 2667

R.java containing bad resource pointers

The auto-generated R.java file in the gen folder contains pointers to all my resources, as usual. The problem is that lately the pointers have been corrupted in some way.

Luckily I found that adding 1 to all the pointers gave the correct result again. My suspicion is that I have been continuously adding new objects, but R.java is not updated. I've tried removing R.java, so a new one is generated, but this doesn't help.

Is there another way to really force the R.java to be rebuilt?

Upvotes: 0

Views: 452

Answers (1)

Robby Pond
Robby Pond

Reputation: 73494

If you choose Project-Clean from the menu in Eclipse it should clean the project and force a re-build. Also any changes you make in the res directory should also trigger a regeneration of the R.java file.

Upvotes: 2

Related Questions