Mostafa Jamareh
Mostafa Jamareh

Reputation: 1439

app:theme now is deprecated

I were using android very fine from yesterday but today when i ran my app through intellijIDEA it gives me :

I/AppCompatViewInflater﹕ app:theme is now deprecated. Please move to using android:theme instead.

my styles is :

    <resources>

    <style name="AppTheme" parent="Theme.Base">

    </style>

    <style name="Theme.Base" parent="Theme.AppCompat.Light.NoActionBar">
        <item name="android:windowNoTitle">true</item>
        <item name="windowActionBar">false</item>
        <item name="colorPrimary">@color/colorPrimary</item>
        <item name="colorPrimaryDark">@color/colorPrimaryDark</item>
        <item name="colorAccent">@color/colorAccent</item>
    </style>
</resources>

what is the problem and how can i solve it?

thanks in advance,

UPDATE :my toolbar.xml file is:

<?xml version="1.0" encoding="utf-8"?>
<android.support.v7.widget.Toolbar xmlns:android="http://schemas.android.com/apk/res/android"
                               xmlns:local="http://schemas.android.com/apk/res-auto"
                               android:id="@+id/toolbar"
                               android:layout_width="match_parent"
                               android:layout_height="wrap_content"
                               android:minHeight="?attr/actionBarSize"
                               android:background="?attr/colorPrimary"
                               local:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
                               local:popupTheme="@style/ThemeOverlay.AppCompat.Light" />

android sdk tools : 24.3.3

android sdk build tools :22

android support library : 22.2

Upvotes: 3

Views: 4089

Answers (1)

N J
N J

Reputation: 27535

try

<?xml version="1.0" encoding="utf-8"?>
<android.support.v7.widget.Toolbar 
           xmlns:android="http://schemas.android.com/apk/res/android"
           xmlns:local="http://schemas.android.com/apk/res-auto"
           android:id="@+id/toolbar"
           android:layout_width="match_parent"
           android:layout_height="wrap_content"
           android:minHeight="?attr/actionBarSize"
           android:background="?attr/colorPrimary"
           android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
          />

Upvotes: 5

Related Questions