at the beginning of your MainActivity.java:
remove
package com.your.app;
as this will cause
import com.your.app.R to be greyed out.
import com.your.app.R
and then add it to ensure that R is correctly imported in MainActivity.java
import com.your.app.R;