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 TextView

sushil kumar
sushil kumar
4,385 Points

android emulator

I ran my first Androip application which by default only print Hello world! but as soon as my virtual device launch the application then the design of the .xml file become invisible with the following error:

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:422)   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 2147418311 (6 similar errors not shown) Failed to load AppCompat ActionBar with unknown error. (3 similar errors not shown)

what to do?

Carlos Casciano
Carlos Casciano
10,459 Points

Same thing happened here, I switched the device from Nexus 4 to antoher one and it ran properly. You can try to reset your project as well, when I made this project the second time it didnt happened.

1 Answer

Christopher Anoruo
Christopher Anoruo
203 Points

Hi, I see this message at the top of my android studio "Gradle project sync failed. Basic functionality (e.g. editing, debugging ) will not work properly. " when i switch to Design and text mode. Also, i don't see the android appear in the design mode for me to drag and drop items on it during designing.

Thank you in advance.