最近更新了自己Android Studio中的SDK到最新版本,AS的一部分配置修改了。
然后 在打开布局文件的时候 会出现 渲染错误 Rendering problem
<code class="hljs applescript has-numbering" style="display: block; padding: 0px; color: inherit; box-sizing: border-box; font-family: 'Source Code Pro', monospace;font-size:undefined; white-space: pre; border-radius: 0px; word-wrap: normal; background: transparent;"><span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">the</span> rendering library <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">is</span> more recent than your <span class="hljs-property" style="box-sizing: border-box;">version</span> <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">of</span> android studio</code><ul class="pre-numbering" style="box-sizing: border-box; position: absolute; width: 50px; top: 0px; left: 0px; margin: 0px; padding: 6px 0px 40px; border-right-width: 1px; border-right-style: solid; border-right-color: rgb(221, 221, 221); list-style: none; text-align: right; background-color: rgb(238, 238, 238);"><li style="box-sizing: border-box; padding: 0px 5px;">1</li></ul>
提示:如上所示。这个是由于更新了SDK之后渲染版本自动改变了,当前工程的配置的版本与渲染设置的版本不同。
解决办法如下。
打开任意布局文件,切换到Design视图
点击如图所示的图标,选择 API版本,如果更新了SDK一般会自动的修改为最新版本,你可以修改低一点。 可以查看module中的build.gradle文件查看当前的工程使用的API版本,然后修改。