Android Studio渲染问题:无法在当前主题中找到样式'coordinatorLayoutStyle'

问题描述 投票:0回答:1

每当我添加导航活动时,我都会在下面看到此问题的截图。有关更多详细信息,我使用的是编译SDK版本27.我在添加导航活动后生成的布局文件中遇到此问题。

我的主题是AppTheme.NoActionBar

我的styles.xml文件内容如下:

<!-- Base application theme. -->
<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>
</style>

<style name="AppTheme.NoActionBar">
    <item name="windowActionBar">false</item>
    <item name="windowNoTitle">true</item>
</style>

<style name="AppTheme.AppBarOverlay" parent="ThemeOverlay.AppCompat.Dark.ActionBar" />

<style name="AppTheme.PopupOverlay" parent="ThemeOverlay.AppCompat.Light" />

该怎么办?我几乎坚持这个。

enter image description here

android android-studio-3.0
1个回答
0
投票

我认为使用(Base.Theme)您的问题解决方式如下:parent =“Base.Theme.AppCompat.Light.DarkActionBar”>

© www.soinside.com 2019 - 2024. All rights reserved.