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"> </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"> </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?
source share