This problem has been addressed hundreds of times here but I haven't still solved it.
I have tried everything available on Stack Overflow and everywhere else:
import android.R
and import android.R.*
But now I don't know what to do.
(Posted on behalf of the OP).
I had to update to buildToolsVersion "21.1.2".