Ответ 1
Замените app:theme
на android:theme
, но вы можете иметь ситуацию, когда вы не используете app:theme
. Проверьте свой макет, особенно макет панели инструментов. В моем случае у меня не было app:theme
в моих файлах макета. Затем взгляните на мою ситуацию:
<android.support.v7.widget.Toolbar xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:styled="http://schemas.android.com/apk/res-auto"
android:id="@+id/toolbar_actionbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:background="?attr/colorPrimary"
android:minHeight="?attr/actionBarSize"
styled:popupTheme="@style/ToolbarDarkPopup"
styled:theme="@style/ActionBarThemeOverlay" />
И я изменил этот макет на:
<android.support.v7.widget.Toolbar xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/toolbar_actionbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:background="?attr/colorPrimary"
android:minHeight="?attr/actionBarSize"
android:theme="@style/ActionBarThemeOverlay" />
Теперь я не вижу предупреждения.
Посмотрите также здесь: https://chris.banes.me/2015/04/22/support-libraries-v22-1-0/
Великое объяснение Криса Банеса