Using a Holo Theme in Combination with AppCompatActivity

I have a fairly simple Android application that uses the support library to create an action bar for devices running on APIs below 11 , so my main activity extends AppCompatActivity .
My current application theme is as follows:

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

After running some tests and to ensure the application, as I expected, I decided to set a theme for devices operating at the API level 14 and above, as shown below:

 <style name="AppTheme" parent="android:Theme.Holo.Light.DarkActionBar"> <!-- Customize your theme here. --> </style> 

The application has crashed since launch since.
The log code indicates that an exception is being generated that says the following:

You need to use Theme.AppCompat (or child) theme with this action.

Does this mean that I should only use AppCompat themes, regardless of the deviceโ€™s API?
If not, how can I solve this problem?

+4
source share
1 answer

Does this mean that I should only use AppCompat themes, regardless of the deviceโ€™s API?

Yes. Or stop using appcompat-v7 and inherit from Activity .

+1
source

All Articles