R is a generated class. You may need to manually import it in to your code.
The
R class should be in the top-level package for application. For example, in my case the top-level package for the application is:
com.mcleodnet.hflink, so my code imports:
import com.mcleodnet.hflink.R