布局管理器出现Please add a root view or layout to your document错误
来源:互联网 发布:达芬奇家具真相 知乎 编辑:程序博客网 时间:2024/05/26 20:22
今天升级了ADT插件后,发现eclipse的可视化布局管理器对有些layout显示不正常,提示的错误信息是No XML content. Please add a root view or layout to your document.后来google了一下,有人介绍是ADT插件的eclipse版本bug问题,建议更新到最新或者换另一版本的eclipse,我升级到最新的ADT后,现象依然存在,后面别人介绍删除在config中自己在custom中定义的模拟器就恢复了正常。但是自己不能新建editing config,那岂不是很不方便,如是我想到了另外一个方法,就是copy默认的config一份,然后再在custom里面修改刚刚拷贝的这一份成自己想要的屏幕大小,一般系统默认的这几种屏幕设置是不会出现上述这种root view错误的,如是操作,显示也正常了。例如我开发android应用是再800*480的环境下,如果activity模式是FEATURE_NO_TITLE,需要将屏幕设置为800*505,拷贝了5.1in WVGA 然后在custom中编辑刚刚的5.1in WVGA Copy,点击edit-》修改800*480为800*505就ok了。
各位留言没有及时回复,不好意思,下面发几个截图方便大家理解,首先我的版本参见下图
custom进去
configurations界面
选择其中portrait或者landscape进行修改成自己想要的布局模式
里面很多熟悉,包括宽高像素,显示密度,横竖屏等等,自己想怎么DIY就怎么设置,多弄下就知道他们的用法了。
最后总结下,出现这个问题的解决方案,首先删除掉自己新建立的布局模式,在device configuration里面找到最适合你的模式拷贝一份,然后edite拷贝出来的模式改造成自己想要的。完毕~~
- 布局管理器出现Please add a root view or layout to your document错误
- eclipse报 No XML content. Please add a root view or layout to your document. 错误的解决办法
- ios 出现 application windows are expected to have a root view controller 错误解决方法
- iOS 9出现错误Applications are expected to have a root view controller at the end of application launch
- qt QLayout: Attempting to add QLayout "" to MainWindow "", which already has a layout. 错误
- Add a Border to an Android Layout
- subversion 出现 Repository moved permanently to 'xxx' please relocate or 301 错误
- svn1.7 appears to be part of a Subversion 1.7 or greater working copy. Please upgrade your Subversio
- 执行ssh-add时出现Could not open a connection to your authentication agent
- 执行ssh-add时出现Could not open a connection to your authentication agent
- 执行ssh-add时出现Could not open a connection to your authentication agent
- 执行ssh-add时出现Could not open a connection to your authentication agent
- 友盟统计出现Add the Push Notifications feature to your App ID.的错误
- Attempting to add QLayout "" to MainWindow "", which already has a layout 给QWidget或者QDialog设置布局的时候方
- jdesktop.layout布局管理器
- Layout Managers(布局管理器)
- java-Layout(布局管理器)
- VMWare安装64位CentOS6.3出现Unable to boot - please use a kernel appropriate for your CPU.解决方法
- php调用远程url的六种方法
- 反卷积程序
- Oracle中Union与Union All的区别
- 在Ubuntu中用root帐号登录
- Use case图
- 布局管理器出现Please add a root view or layout to your document错误
- VMWare支持操作系统版本
- 树根阅读计划开题篇
- 关于日期函数next_day()的使用
- Understanding NUll values of Oracle
- mysql的大小写敏感性
- 在一小时内学会 C#。
- AsyncQueryHandler
- 【模拟高精度+进制转换】数学序列