Android Studio 布局预览未显示设计 [英] Android Studio Layout preview not showing design

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

问题描述

我目前正在做一个项目,一切都很好.今天,当我打开 android studio 时,设计/布局预览仅显示白屏.(如图)

I am currently working on a project and everything was fine. Today, while I opened android studio, the design/layout preview showing white screen only. (Like the picture)

我确实尝试过:

  1. 使缓存无效并重新启动
  2. 强制布局刷新
  3. 将 appcombat 降级到 27.1.1
  4. 在 style.xml 中添加 Base.Theme

但是,没有任何效果.没有构建错误,在模拟器中运行良好,在模拟器中显示设计,但在 android studio 中没有.

任何解决方案都会有很大帮助,如果您需要更多详细信息,也请告诉我.

Any solution would be a great help, also let me know if you need more details.

即使是具有 Hello World 布局的新项目也显示相同.尝试,卸载并安装Android Studio.

Even a new project with Hello World layout appears same. Tried, uninstalling and installing Android Studio.

推荐答案

我不知道出了什么问题,但以下步骤解决了我的问题:

I don't know what was wrong, but below steps solved my problem:

  1. 从 C:/Users//.grade/caches 清除缓存文件夹
  2. 从 C:/Users//.AndroidStuido3.x/system/caches 清除缓存文件夹
  3. 重启 Android Studio
  4. 清理构建项目

经过数小时的试验和大量解决方案,这是真正有效的方法.

After hours of experimenting and going through lots of solutions, this was the one that actually worked.

希望将来遇到此问题的任何人都会发现这有帮助.

Hope anyone in the future faces this problem will find this helpful.

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

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