Android Build a Simple Android App Creating the Screen Layout Setting a Fullscreen Theme

Matthew Lee
Matthew Lee
6,553 Points

Error inflating class android.widget.RelativeLayout

HI I am getting a Error inflating class android.widget.RelativeLayout. How can I resolve this error?

I have basically been copying along with the video.

Seth Kroger
Seth Kroger
56,362 Points

If you look at your layout XML file (text view, not design) there's more than likely red markers in the file and on the right side indicating an error. If you hover over them they should give you advice on how to fix them.

Matthew Lee
Matthew Lee
6,553 Points

Thanks Seth, got it solved. I wasnt seeing the redmarks initally for some reason. But I restarted the studio and I was able to locate the error.

1 Answer

Beatriz Fuentes
Beatriz Fuentes
2,207 Points

Try this,

Clean Project , Rebuild Project recheck that the right ids refer to the right element