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 trialOld Man
1,333 PointsGraphic Layout won't display
getting error "exception raised during rendering: Could not initialize class android.widget.TextView"
2 Answers
Luke O'Neill
7,822 PointsThere is a mismatch between your target SDK version and your Graphical Layout target, should be an easy fix.
If you don't know it off the top of your head, you can get your Android SDK version for your project from right-clicking on your project name, going to Properties, selecting "Android", and looking for the test in the "platform" column for the row with a checkmark.
Then in the Graphical Layout for your XML file, in the top right in between the Locale selector and the Create button is a drop-down for Android versions. Change this to match the one for your project, and the errors should go away the graphical preview will render correctly.
Old Man
1,333 Pointsthat worked, thanks luke.