@color/colorPrimary">
当前位置:   article > 正文

解决导入项目时找不到对应主题style_resource style/theme.materialcomponents.daynight.d

resource style/theme.materialcomponents.daynight.darkactionbar not found.

最近导入项目后在应用主题时候经常会报错,
例如

    <style name="AppTheme" parent="Theme.AppCompat.DayNight.DarkActionBar">
        <!-- Customize your theme here. -->
        <item name="colorPrimary">@color/colorPrimary</item>
        <item name="colorPrimaryDark">@color/colorPrimaryDark</item>
        <item name="colorAccent">@color/colorAccent</item>
    </style>
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6

这里就会找不到Theme.AppCompat.DayNight.DarkA这个主题,因为该主题是V7包中的,然而会出现明明complie了V7包也找不到该主题的时候,这时候需要在build的intermediates中的exploded-aar中去找到v7包中的jar包,然后手动addLibrary.

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/你好赵伟/article/detail/257939
推荐阅读