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!

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 (2014) Creating the Screen Layout Adding a TextView

Rendering Problem with "Ants stretch when they wake up in the morning"


I am stuck on "Adding a TextView" in Android development track.

I am following along with the video in my own Android Studio environment and trying to add the TextView box "Ants stretch when they wake up in the morning." This text box renders fine at first but when I go to resize it to "24sp" as the video states I get the following error:

Rendering Problems Exception raised during rendering: java.util.Locale.toLanguageTag()Ljava/lang/String;

The text is not resizing and that error comes up. I tested a couple different things and it seems like the text is not automatically line breaking when it gets to big. I typed in additional text at the normal size and as soon as the text made it to the edge of the screen, instead of auto line breaking, it renders this error as well...

Not really sure why? Maybe a weird setting I have? Anyone have any ideas? Thanks!

I was able to resolve this issue by simply clicking the check box "singleLine". It's located 2 spaces above the "text" field in the properties pane.

2 Answers

Harry James
Harry James
14,780 Points

You're not the only one having this issue!

With a bit of research, it looks like this is in fact a bug with the SDK you are using.

There is actually a BugZilla page about the bug here that was updated yesterday!

You may be wondering where the toLanguageTag() bit comes from but, that is the method that is ran when rendering text and is what is causing the exception.

Right now, there's not too much you can do about this but find an alternative (i.e: Use font sizes that work). Hopefully a fix will be available for the bug soon though :)

Ahhhh well that clears that up! Thanks so much Harry. It was getting really frustrating trying to figure out what setting I may of accidentally enabled!

Mark Bradshaw
Mark Bradshaw
Courses Plus Student 7,658 Points

I don't know if everyone has already resolved this problem, but I went to youtube and found a good video that helped me resolve it. It involved updating the android studio version via canary. https://www.youtube.com/watch?v=6U9NkVZGvZw