Error in app theme

3

Personally I implemented some tabs in the app I'm developing with fragments and had to use the APPCompat theme but started giving this error:

  

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

Ai vai la no manifest and change to AppCompat, but there no longer appears my actionbar in the app.

With the Theme.Holo.Light the actionbar appears, but if I change because of the error it disappears.

And now?

Does anyone have any ideas?

Manifest

<application
    android:allowBackup="true"
    android:icon="@mipmap/logo_bse_sem_fundo"
    android:label="@string/app_name"
    android:supportsRtl="true"
    android:theme="@android:style/Theme.Holo.Light">


    <activity android:name=".MainActivity">
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />

            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>
    <activity android:name=".Home_Activity" />
    <activity android:name=".BuscarClienteActivity" />
    <activity android:name=".InformacoesActivity"
        android:theme="@style/Theme.AppCompat.Light"></activity>
</application>

Styles

<!-- Base application theme. -->
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
    <!-- Customize your theme here. -->
    <item name="colorPrimary">@color/colorPrimary</item>
    <item name="colorPrimaryDark">@color/colorPrimaryDark</item>
    <item name="colorAccent">@color/colorAccent</item>
</style>

    
asked by anonymous 28.06.2016 / 01:19

1 answer

0

The% of% you are trying to use Activity extends from class ActionBar , in this case it is mandatory that you use the ActionBarActivity theme.

Make your activity extend from class AppCompat and leave the Activity theme that will probably work.

@Edit

If you want to continue using Theme.Holo.Light , use a descending theme of AppCompat , Theme.AppCompat or Theme.AppCompat.Light

    
28.06.2016 / 04:56