R.layout.... compilation errors

Ditulis oleh: -
You are working in your android project. Everything was fine. Suddenly you start getting lot of errors. The errors are in all the lines which use R like R.layout, R.drawable etc.

Just check your import statements. Most probably there is an import which says

import android.R;

Hence all the resources are tried in android.R., Not in your R.java file. 

Remove the import statements. And all these compilations errors vanish