Close your layout files in the editor and restart your Eclipse.
If you are using Android 3.0 and above on your Graphical Layout. Try changing it to Android 2.2 or 2.3.
update your Android studio to latest version and after that update your gradle