I have been trying to get into this android hardware development and like many I have been suffering from the
R cannot be resolved to a variable
After finding no luck with the solutions on the web I started pooking around the web.
In the end I found it was the following that caused the issue
All I did was delete
android:theme=”@android:style/Theme.Holo”
Run Project>Clean followed by refresh and that got rid of the R cannot be resolved to a variable issue.
Now I just need to solve the
The import android.text.SpannableStringBuilder is never used
Issue’s.
The issue you are having with R comes down to the fact that the theme chosen for this app is Holo which I believe is only available on ICS. If you either, change the theme, delete it or change the target of your project and rebuild the project, this works fine.
Don’t worry too much about warnings. The “is never used” warnings won’t usually affect your app.
As I said I just deleted the ref and changed a few setting which sorted it!