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 trialPremkumar Chandrashegaran
1,333 PointsRendering Problems in activity_fun_facts.xml tab
Hi,
My app is not displaying correctly when I open the layout tab. I have these messages appearing when I click on the .xml tab:
"The following classes could not be found: - android.support.v7.internal.app.WindowDecorActionBar (Fix Build Path, Create Class) Tip: Try to build the project. 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)"
Thanks for your help!
4 Answers
Dylan Carter
4,780 Pointshttp://stackoverflow.com/questions/18195807/android-studio-rendering-problems
figured it out. do the first answer on here with like 341 votes. when you click on the indicated button, you probably have "pick what is best for me" selected, go below it and select API 21: Android 6.0.
Premkumar Chandrashegaran
1,333 PointsI downloaded it from the Android Web. The more I do it, the more I understand. Sometimes, you just have to build it again. Anyways, thanks bud!
Sushant Bindra
625 PointsThanks for the solution !
Aadi Kapur
195 PointsI changed the API to API 21 but now I don't see the action bar. Thanks!
Sushant Bindra
625 PointsYou can also try rebuilding the project. Worked for me ! Or try this : http://stackoverflow.com/questions/33742114/the-following-classes-could-not-be-found-android-support-v7-internal-app-window
sukjae lee
5,705 Pointsits inside app > res > layout > activity_fun_facts.xml (in Android view)
Dylan Carter
4,780 PointsDylan Carter
4,780 Pointsthe same thing is happening to me, did you download AS from there main website and not the treehouse package thing?