I was working on a small project of mine and, all of a sudden, my project started giving a bunch of errors. From the layout that wasn’t resolved, to class variables, it was a mess and extremely weird. Tried cleaning and building the project manually, re-opening Eclipse but nothing worked.

Solution? Find the following line of code (right at the top of your file)

import android.R;

Remove it and everything should build successfully.