无法解析符号'@ style/Widget.Design.CoordinatorLayout' [英] Cannot resolve symbol '@style/Widget.Design.CoordinatorLayout'

查看:190
本文介绍了无法解析符号'@ style/Widget.Design.CoordinatorLayout'的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用带有构建工具28的最新版本的Android Studio(3.1.3).

I'm using the latest version of Android Studio (3.1.3) with build tools 28.

当我使用协调器布局时,布局不会在设计选项卡中呈现.许多人指出,要解决此问题,请在style.xml中添加以下几行:

The layout does not get rendered in the design tab when I'm using coordinator layout. Many have pointed out that to get around this problem is to add the following lines in the style.xml:

<style name="AppTheme.NoActionBar">
  <item name="coordinatorLayoutStyle">@style/Widget.Design.CoordinatorLayout</item>
</style>

但是添加行会产生以下错误:Cannot resolve symbol '@style/Widget.Design.CoordinatorLayout'.

However adding the lines produces the following error: Cannot resolve symbol '@style/Widget.Design.CoordinatorLayout'.

有没有解决这个问题的地方?

Is there away to get around this issue?

推荐答案

尝试(API 28)->

Try (API 28)->

<style name="AppTheme.NoActionBar">
    <!--<item name="coordinatorLayoutStyle">@style/Widget.Design.CoordinatorLayout</item>-->
    <item name="coordinatorLayoutStyle">@style/Widget.Support.CoordinatorLayout</item>
</style>

这篇关于无法解析符号'@ style/Widget.Design.CoordinatorLayout'的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆