Android Studio 不显示布局预览 [英] Android Studio does not show layout preview

查看:76
本文介绍了Android Studio 不显示布局预览的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用的是 Android Studio 1.4

I'm using Android Studio 1.4

自从我上次在 android studio 中创建新项目以来已经过去了一段时间,今天当我这样做时,android studio 没有显示布局预览中的任何内容.它是一个空白窗口,上面写着没什么可显示的".

It has passed some time since the last time I've created a new project in android studio and today when I did it the android studio does not show anything from the layout preview. Its a blank window and says "Nothing to show".

我认为这与新的支持设计库有关,因为我从未见过这个新的默认代码".我已经研究了一下,这是新的 android 材料设计指南......

I think it's related with the new support design library cuz I've never seen this new "default code". I've researched a bit and it's the new android material design guidelines ...

我已经这样做了:

  1. 更新了 SDK 工具
  2. 清理项目并重建它
  3. 使缓存失效并重新启动

...还是什么都没有.

...and still nothing.

更新:

我决定更新 1.5.1 它是这样的:它给了我渲染问题..我认为它没有正确显示右下角的按钮,因为我认为它应该是一个按钮它和我的 AS 中的消息图标仅显示消息图标(如果我错了,请纠正我).

I decided to update 1.5.1 it's like this: it's giving me that rendering problem.. I think it's not showing correctly the lower right button, cuz I think it's supposed to be a button with a message icon in it and in my AS just shows the message icon (correct me if I'm wrong).

推荐答案

选择另一个主题(除了Holo,例如Theme)

Choose another theme (other than Holo, for example Theme)

当您错误地创建样式或从现有样式创建样式时,通常会出现此问题.所以选择Graphical Layout"选择应用主题"(带有蓝色星星的标签).并选择任何预定义的样式.就我而言,光"这应该可以解决问题.

When you create the style incorrectly or from an existing style, this problem usually occurs. So select the "Graphical Layout" select "AppTheme" (The tab with a blue star). And select any of the predefined style. In my case "Light" which should resolve the problem.

选择此选项重新启动您的 Android Studio.可能需要一些时间.

Restart your Android Studio by choosing this option. It may take some time.

然后,如果仍然不起作用,请尝试重建您的项目.

Then, if still doesn't work try to rebuild your project.

这篇关于Android Studio 不显示布局预览的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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