我正在使用最新版本的 android studio (3.0),以及最新的构建工具 (27) 和类似的 API 级别。
布局没有在设计选项卡中呈现,这造成了很多麻烦,尤其是我正在使用协调器布局。
如何解决这个问题?
最佳答案
我通过简单地将这一行插入应用程序主题(应用程序主题通常放在styles.xml中)解决了这个渲染问题。
[SDK 28]
<style name="AppTheme">
<item name="coordinatorLayoutStyle">@style/Widget.Support.CoordinatorLayout</item>
</style>
[SDK 27]
<style name="AppTheme">
<item name="coordinatorLayoutStyle">@style/Widget.Design.CoordinatorLayout</item>
</style>
As suggested by @Chris. If the IDE does not find the CoordinatorLayout in Widget.Support or Widget.Design, just start typing "CoordinatorLayout" and it should give you some options.
关于android - 在当前主题中找不到样式 'coordinatorLayoutStyle',我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49292487/