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 Adding a Button

Can't emulate my app.

So, I've been closely following the tutorial "Build a Simple Android App". When I try to emulate it by the end of "Adding a Button" video, my app fails to emulate.

It says:

Rendering Problems The following classes could not be instantiated: - android.support.v7.app.WindowDecorActionBar (Open Class, Show Exception, Clear Cache) Tip: Use View.isInEditMode() in your custom views to skip code or show sample data when shown in the IDE Exception Details java.lang.NullPointerException   at android.support.v7.app.WindowDecorActionBar.getDecorToolbar(WindowDecorActionBar.java:241)   at android.support.v7.app.WindowDecorActionBar.init(WindowDecorActionBar.java:198)   at android.support.v7.app.WindowDecorActionBar.<init>(WindowDecorActionBar.java:190)   at java.lang.reflect.Constructor.newInstance(Constructor.java:526)   at com.android.layoutlib.bridge.bars.AppCompatActionBar.<init>(AppCompatActionBar.java:89)   at com.android.layoutlib.bridge.impl.Layout.createActionBar(Layout.java:237)   at com.android.layoutlib.bridge.impl.Layout.<init>(Layout.java:151) Copy stack to clipboard Failed to find the style corresponding to the id 2147418176 (6 similar errors not shown) Failed to load AppCompat ActionBar with unknown error. (3 similar errors not shown)

What now?

1 Answer

You likely dragged the "Plain Text" view (found under Text Fields) rather than the "Plain TextView" (found under Widgets). The first is an editable input. I did the same thing. Swapped it out and all is gold.