0

I've taken the basic Hello World app from the SDK examples and have been learning Android by modifying it. Currently I'm trying to change the Theme. I'm testing it on my Nexus 7 running the latest OS and I'm using Eclipse.

In my manifest I have

android:theme="@style/AppBaseTheme"

In values-v11/styles I have

style name="AppBaseTheme" parent="android:Theme.Black

I've tried using Holo and am aware I need to be V11 or higher to do that.

When I try running my app it starts on the tablet and I can see the black background as expected, but before it can draw any components Eclipse goes to debug mode in ActivityThread.performLaunchActivity and then into ZygoteInit$MethodAndArgsCaller.run() before my app dies.

If I use this it's fine:

style name="AppBaseTheme" parent="@style/Theme.AppCompat.Light"

I feel I'm missing something obvious or there's a fundamental part of Themes that I don't understand. I have tried removing the .android/ directory and restarting Eclipse, that fixed a few other issues.

I know the @ symbol in this context denotes that it is an inbuilt style by android. Does that mean I have to add something to my app to link in other themes? If so what exactly?

Marc Bacvanski
  • 1,458
  • 4
  • 17
  • 33
UnixNerd
  • 333
  • 1
  • 4
  • 15
  • i am not really sure but i think having themes require another support project linked in you current one (android-support-v..-appCompat). try removing the theme in the manifest and in the style layout files. – hanaa Jul 31 '14 at 15:50
  • This post fixed it: http://stackoverflow.com/questions/21814825/you-need-to-use-a-theme-appcompat-theme-or-descendant-with-this-activity Now working with Holo :-) – UnixNerd Aug 08 '14 at 12:56

0 Answers0