布局预览在Android Studio中无法使用 [英] Layout preview not working in Android Studio

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

问题描述

我把一个Android工程从Eclipse移植到了Android Studio。该项目建成的很好。但是我无法看到任何布局预览。当我去布局的设计标签时,我得到一个


加载配置...


<

消息永远不会消失(见图)





我已经在项目结构中正确设置了Android SDK。
这与所有的xml文件发生,我无法从


查看 - >工具打开预览窗口Windows - >预览


我尝试创建一个新项目,一切都显示正常。我错过了什么吗?任何人面临类似的问题?是否有机会发生这种情况,因为文件夹结构不是默认的? (布局不在 project / src / main / res / layout 下,但在 project / res / layout 下)

解决方案

尝试这个


  1. Build> Clean Project

  2. 建立>重建项目

它适用于我


I ported an android project from Eclipse to Android Studio. The project builds just fine. However I am not able to see any layout preview. When I go to the Design tab of a layout I get a

Loading Configuration...

message that never goes away (see image).


I have set correctly the Android SDK in the project structure. This happens with all the xml files and I am not able to open the "Preview" window from

View -> Tool Windows -> Preview

I tried creating a new project and everything was showing fine. Am I missing something? Anyone faced a similar issue? Is there a chance that this is happening because the folder structure is not the default one? (The layouts are not under project/src/main/res/layout but under project/res/layout)

解决方案

Try this

  1. Build> Clean Project
  2. Build> Rebuild Project

It worked for me

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

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