Previous people have had the same error message, but the solution has always been to remove or modify some import \"android.R\". I have no such import so I\'m really lost
Try the following
com.example.mapssample.R.layout.activity_main
I have three ways that help me to solve this problem, may be it works for you.
import com.example.mapssample.R;
Heh.. similar prob.. turns out somewhere along the line I had renamed the map fragment ID in the XML layout file.. Was looking for a fragment ID that did not exists.. hope it helps someone else.
Your Code imported android.R so first remove this line import android.R;
so remove this line & press cntrl+shift+o (to import necessary packages)..
the activity_main.xml file maybe is wrong.I mean there is some weird symbol error inside the file.you shold check it out.