Android – R cannot be resolved to a variable [duplicate]

I think I found another solution to this question.

Go to Project > Properties > Java Build Path > tab [Order and Export] > Tick Android Version Checkbox
enter image description here
Then if your workspace does not build automatically…

Properties again > Build Project
enter image description here

Leave a Comment