1

I have an app I was working on. We wanted to upgrade the minSDK from Froyo to IceCream Sandwich (14) so we could use some of the newer features including the Holo Dark theme.

On StackOverflow we found steps for editing the build.gradle (Module: app) file and changed the minSDK to 14. We resync'd as requested. Then rebuilt the app. All compiled fine and ran on our connected device which is running 4.4.4

I then went to the styles.xml file and changed the AppTheme accordingly.

 <style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">

to

   <style name="AppTheme" parent="android:Theme.Holo">

also as recommended here.

I rebuild the app and it compiles fine. When it attempts to run on our connected device, I get a "The Application has Stopped" immediately.

I looked in the LogCat (per a Comment) and once I figured out what I was looking at, I found this line:

Caused by: java.lang.IllegalStateException: You need to use a Theme.AppCompat theme (or descendant) with this activity.

Not sure what that means.

Am I missing something either on the "SDK" change or on the Theme?

Thanks Pete

Peter
  • 437
  • 4
  • 13
  • Look at your Java stack trace in LogCat: https://stackoverflow.com/questions/23353173/unfortunately-myapp-has-stopped-how-can-i-solve-this – CommonsWare Apr 21 '15 at 23:57
  • Are there different styles in v-14 folder? – Harry's Lab Apr 22 '15 at 07:03
  • Not to sound naive (new to Android programming), what is the v-14 folder? I would "assume" these would be "normal" because I am relatively early in app development... but with changing SDK and Android Studio being relatively new too... not sure. – Peter Apr 22 '15 at 11:41

1 Answers1

1

Hey can you show your code for said activity? Especially the declaration. I've had this error before and it might have to do witht the fact that you aren't extending (extends) the right actionbar in your activity's declaration.

For example :

extends ActionBarActivity
Paperbag Writer
  • 803
  • 1
  • 10
  • 36