图形布局在带有 adt 10.1 的 Eclipse 中不起作用
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/5848385/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
graphical layout not working in eclipse with adt 10.1
提问by user590849
i am using eclipse with adt 10.1 for android development. i making the xml files via coding. whenever i switch over to the graphical layout to see how what i have written looks, sometimes the graphical layout does not show anything.
我正在使用 Eclipse 和 adt 10.1 进行 android 开发。我通过编码制作 xml 文件。每当我切换到图形布局以查看我所写的内容时,有时图形布局不显示任何内容。
why does this happen. and how do i solve this?
为什么会发生这种情况。我该如何解决这个问题?
thank you in advance.
先感谢您。
采纳答案by vinod
Just right click on the .XML file and choose Android layout editor you well get it. And there are more options available so you can use any one of those.
只需右键单击 .XML 文件并选择 Android 布局编辑器即可。还有更多可用选项,因此您可以使用其中任何一个。
回答by Andro Selva
Yes, this is a strange problem with eclipse I believe. Try this out,
是的,我相信这是 eclipse 的一个奇怪问题。试试这个,
Right click your XML file and select openwith->android layout editor
右键单击您的 XML 文件并选择openwith->android 布局编辑器
回答by Mahesh
this is an odd problem, and strangely, has a simple solution, (none that were mentioned above worked)..
这是一个奇怪的问题,奇怪的是,有一个简单的解决方案,(上面提到的都没有工作)。
CLOSE ECLIPSE 'n START AGAIN,
关闭日食'n重新开始,
Removing a project from the workspace and then importing it again didn't really work for me..
从工作区中删除一个项目然后再次导入它对我来说并没有真正的工作..
im using 64-bit windows.. that could be a reason.
我使用 64 位 Windows .. 这可能是一个原因。
回答by None The Wiser
I was having this problem, and found that the combo box on the top right side of the Graphical Layout screen was empty. If I selected a version of Android in this combo box, the layout would show up. This seems to be caused, at least for me, by selecting a Google APIs Project Build Target rather than one of the Android X.X ones. This setting is in Properties->Android.
我遇到了这个问题,发现图形布局屏幕右上角的组合框是空的。如果我在这个组合框中选择了一个 Android 版本,布局就会显示出来。至少对我而言,这似乎是由于选择了 Google API 项目构建目标而不是 Android XX 目标之一造成的。此设置位于Properties->Android 中。
回答by user1518458
I had to update my ADT-Eclipse-Plugins through Help->Find Updates... That solved the problem.
我不得不通过“帮助”->“查找更新”来更新我的 ADT-Eclipse-Plugins...这解决了问题。
回答by fider
As None The Wiserwrote. In my case I hadn't this top right corner empty but I had to mark it again(my target device in top right corner of grapihcal layout editor).
正如无智者所写。在我的情况下,我没有这个右上角是空的,但我不得不再次标记它(我的目标设备在图形布局编辑器的右上角)。
回答by sumit pandey
I was facing the same problem. But some how i was able to generate graphical view.
我面临着同样的问题。但是我如何能够生成图形视图。
Go to window tab in eclipse and then click android SDK manager. Check for any update available. Most probably
转到 Eclipse 中的窗口选项卡,然后单击 android SDK 管理器。检查任何可用的更新。最可能
android SDK platform tools and android SDK tools
android SDK platform tools and android SDK tools
update will be available.Update it and your eclipse will work fine.I think it happens due to compatibility issue.
更新将可用。更新它,您的日食将正常工作。我认为这是由于兼容性问题而发生的。
回答by kamal_tech_view
I try the above but it doesn't work for me but simple restarting the eclipse solve my issue, Hope it will help you.
我尝试了上述方法,但对我不起作用,但简单地重新启动 eclipse 即可解决我的问题,希望对您有所帮助。
回答by Xpleria
In the menubar goto Project>Clean Select "Clean all projects" and then load the xml again choose your version of android.
在菜单栏中转到 Project>Clean 选择“Clean all projects”,然后再次加载 xml,选择您的 android 版本。
This should do. If not try selecting other options.
这个应该可以。如果没有尝试选择其他选项。
Worked for me!
对我来说有效!