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 trialAustin Garrison
9,692 PointsApp crashes after assigning view to variable
The app works fine up until I add mRelativeLayout = (RelativeLayout) findViewById(R.id.relativeLayout); the app then crashes and wont open again. the id under .xml is android:id="@+id/relativeLayout"
Andrew Snyder
183 Points@Austin Garrison Thank you for posting your solution, I had the exact same problem and replacing all traces of "relative" with "constraint" did the trick. I had noticed at the very beginning that they were different but I didn't think anything of it and then when I got to this part I thought my computer was broken!
Kerry Smyth
3,921 PointsThanks Austin Garrison! The course certainly does need to be updated. TeamTreeHouse should add text over the top like in YouTube clips at least warning of the changes. Wasting my time.
Austin Garrison
9,692 PointsAustin Garrison
9,692 PointsFixed it on my own.... Replaced anything that says RelativeLayout with ConstraintLayout.
These videos need to be updated..