Missing R.java file even though project cleaned

后端 未结 12 1697
猫巷女王i
猫巷女王i 2020-12-03 07:41

Every time in code that I have an R, I get an error R cannot be resolved to a variable.

The R.java file appears to be missing.

I have tried cleaning the proj

12条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-12-03 08:25

    Ah, the "R cannot be resolved" error. I think every Android programmer has run across this sometime or the other. I wish the tools were more robust about generation of R.java & class.

    Try this, it has worked for me in past:

    Right-click on the Project root --> Android Tools --> Fix Project Properties

提交回复
热议问题