'R cannot be resolved to a variable' - gen folder is empty

前端 未结 14 2410
故里飘歌
故里飘歌 2021-02-13 22:34

I\'ve got an error:

R cannot be resolved to a variable

in line:

setContentView(R.layout.main);

but I can\'t r

14条回答
  •  星月不相逢
    2021-02-13 22:56

    Problem is solved, but I don't know what has changed... I reinstalled Eclipse, SDK etc. and gen folder was empty as before, the same problem.

    My supervisor told me to do it all again, and it worked (for now). I don't know what was the cause. I though I'd had tried everything, but it's working now so I'll never know. Thanks for your help guys!

提交回复
热议问题