找不到与给定名称匹配的资源:android中的attr'windowBackground'

时间:2017-09-24 12:20:39

标签: android performance android-layout android-fragments

我正在尝试将图像b.jpg设置为整个应用程序中的背景壁纸。我做了如下

<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>
    <item name="windowBackground">@drawable/b</item>
</style>

我收到错误,如下所示.. Click here to see the image

1 个答案:

答案 0 :(得分:1)

使用此:

<item name="android:windowBackground">@drawable/b</item>