Start a new topic

R cannot be resolved to a variable

R cannot be resolved to a variable


I downloaded Android template from one our app on wikitude studio.

I got several compile errors. 

 

"R cannot be resolved to a variable"  in line 3, 30, 35 of SampleCamActivity.java

 

I attach some pic from IDE:

 

 

The class "R" is automatically generated by the IDE, the error message "R cannot be resolved to a variable" is a generic message of the Android SDK when some component is missing.
Please try changing the Android SDK version (I see you are using 2.3.3) in the project properties to at least Android 4.4, and see if the error disappears.

Your application will still run on Android 2.3, unless you use other features from a newer Android version.

Hi Gabriele,
due my lack of experience in Eclipse/Android. I changed to 4.4.2 and now it works like a charm
thanks
Login or Signup to post a comment