IDEA弹出消息:“Rendering Problems Missing styles. Is the correct theme chosen for this layout? …”
是的,一切都正确,只是IDEA无法看到AppCompat库中的一些符号。
有没有可能抑制这些警告?因为它非常烦人。(我想让IDEA“闭嘴”,尽最大努力渲染所有东西,忽略可能的错误。)
IDEA弹出消息:“Rendering Problems Missing styles. Is the correct theme chosen for this layout? …”
是的,一切都正确,只是IDEA无法看到AppCompat库中的一些符号。
有没有可能抑制这些警告?因为它非常烦人。(我想让IDEA“闭嘴”,尽最大努力渲染所有东西,忽略可能的错误。)
预览的默认主题选择自:
当您在布局中使用tools:context
属性时,从清单中定义的活动主题。
<LinearLayout tools:context=".MainActivity"> ... </LinearLayout>
从清单中定义的应用程序主题。
<application android:theme="@style/Theme.AppCompat"> ... </application>
如果上述主题未扩展Theme.AppCompat.*
,则会出现上述错误,并且必须手动选择预览主题。