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 an Interactive Story App (Retired) User Input Hiding the ActionBar with an App Theme

No application bar

I tried to remove the application bar by changing the theme, but i won't build. It errors out and says 'Theme.AppCompat ' is required. <resources>

<!-- Base application theme. -->
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
    <!-- Customize your theme here. -->
</style>

</resources>

1 Answer

AppCompat stands for Android Support Library and you do not have it installed. Add this to your build.grade file:

    compile 'com.android.support:appcompat-v7:21.0+'

Lastly, make sure you use the NoActionBar theme.

    <!-- Base application theme. -->
    <style name="MyTheme" parent="Theme.AppCompat.Light.NoActionBar">
      <!-- You custom styles -->
    </style>

Thanks for the help. However, which build.gradle file should i modify? There's two of them, with one that says (Project:InteractiveStory) and (Module: app). what is the difference

Kevin Michie
Kevin Michie
6,554 Points

I'm getting a gradle build error that does not recognize compile. What should I do?