Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

like image 243
Mostafa Jamareh Avatar asked Jul 30 '26 20:07

Mostafa Jamareh


1 Answers

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"
          />
like image 157
N J Avatar answered Aug 01 '26 11:08

N J



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!