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

Georgi Koemdzhiev
Georgi Koemdzhiev
12,610 Points

Why I still do not have project action Bar even though I am using the same theme as in the video?

I am using AS v.1.2. and I am trying to match the lecturer's project app theme with mine. His action Bar is present and mine is not, although we are using the same project theme called : AppTheme. Why this is happening? :)

The default theme that the lecturer is using is called : android:Theme.Holo.Light.DarkActionBar and when I try this theme and run the app it crashes!

My Default theme is called: Theme.AppCompat.Light.DarkActionBar. Yeah, without android in front.

Sean Do
Sean Do
11,933 Points

Can you post both your Java class and xml files?

1 Answer

Andre Colares
Andre Colares
5,437 Points

If you are using Gradle, then you have a problem with the latest version of the compatibility library.

If you have the following in your build.gradle file with a '+' at the end:

dependencies { compile 'com.android.support:appcompat-v7:+' } then it may be grabbing a later version of the library than you want.

Changing the dependency to:

dependencies { compile 'com.android.support:appcompat-v7:18.0+' } may fix your problem.

Also, go to the MainActivity class and type:

import ...

public class MainActivity extends AppCompatActivity { .... }

This "extends AppCompatActivity" must be declared.