Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

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

Matthew Lee
Matthew Lee
6,715 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,413 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,715 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