Question

I have added the support library v7 to my project and I think it worked because ActionBarActivity is recognized (import android.support.v7.app.ActionBarActivity works). The problem is that for all my R.ids the R is underlined with the message R cannot be resolved to a variable.

What am I doing wrong?

Was it helpful?

Solution

The problem is probably with R, not anything to do with the support library. Sometimes cleaning the project solves the problem.

A Google search with that message ("R cannot be resolved to a variable") returns tons of answers, try those. Also Stackoverflow is full of these:

If it's got nothing to do with that, then maybe you've got an error in some XML file.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top