This is my first attempt at an Android app. I’m targeting Android 4/Ice Cream Sandwich.
When trying to run the app, I get the err msg “R cannot be resolved to a variable” on this line:
setContentView(R.layout.main);
Yet main.xml IS there, below \res\layout\ as it should be.
What might the problem be with this as-yet as-minimal-as-possible app (the only code it has so far has been auto-generated)?
“R cannot be resolved to a variable” comes when:
a)you mismatch your sdk version
B) there are errors on any of your layouts, which makes the auto-generated R files not to be created
C) Other issues are usually solved by cleaning the project