如何在 Eclipse 中恢复图形布局窗口以进行 Android 应用程序设计?
我不知道发生了什么,但我丢失了我们在 Eclipce 中用于设计 Android 应用程序的 XML 布局的图形布局窗口。 我想要那个设计窗口回来。 我可以看到 xml 代码和所有内容。 。 。但我希望设计编辑器在集成 Android 后在 Eclipse 中默认可用。
那么怎么找回来呢???
I dont know what happend, but i lost the Graphical Layout Window of the XML Layout that we are using in Eclipce to design the Android Application.
I want that Design window back.
I can see the xml code and every thing. . . But i want the Design Editor that is available as by default in the Eclipse after integration of the Android in it.
So how to get it back ???
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(10)
没有人回答我的问题,但通过在 Eclipse 上搜索,我得到了答案:
我必须右键单击 XML 代码布局,然后选择“使用布局编辑器打开”。它将向我显示应用程序的图形布局编辑器,现在我可以看到 XML 布局文件上的图形视图。
No one has answered my question, but by searching on Eclipse I got the answer:
I have to right click on the XML code layout and then select Open With Layout Editor. It will show me the Graphical Layout Editor for my Application and now I am able to see the graphical view on the XML layout files.
您没有在打开的 xml 文件底部看到“图形布局”选项卡吗?
Do you not see the "Graphical Layout" tab on the bottom of the open xml file?
只需遵循以下模式:Package Explorer --->资源 -->布局--->活动_main.XML 打开活动_main.XML
Just follow this pattern : Package Explorer ---> res --> Layout ---> activity_main.XML Open activity_main.XML
如果您使用深色朱诺颜色主题,底部的选项卡不会显示。
改回原来的颜色主题之一,然后它们又回来了。
if you are using the dark juno color theme the tabs at the bottom don't show up.
change back to one of the original color themes and poof they're back.
在 Eclipse 中,只需单击检查更新,然后它将重新启动 Eclipse,现在您可以看到图形布局,问题仅出在 ADT 插件中。
In Eclipse,just click check for updates and after that it will restart the eclipse and now u can see the graphical layout,the problem was in ADT plugin only.
如果您想在布局编辑器中打开所有 xml 文件,请转到首选项->常规->编辑器->文件关联
更改选择中的默认编辑器
If you want to open all the xml files in layout editor, go to Preferences->general->editor->FIle associations
Change the default editor in the selections
对我来说,在阅读了无数不可行的解决方案(包括删除并重新导入项目、单击“打开方式...”菜单等)之后,解决方案非常简单。我使用标准 Eclipse studio 打开该项目。解决方案是通过ADT捆绑目录打开Eclipse,即与Android ADT一起打包安装的Eclipse studio版本。使用 Eclipse 的快捷方式,Android 项目可以使用适当的 Android 工具作为本机 Android 项目打开并运行(和编辑)。
For me, after reading endless non-viable solutions (including remove and re-import the project, click the 'open with...' menu and the like) the solution was stupidly simple. I was opening the project with the standard Eclipse studio. The solution was to open Eclipse via the ADT bundle directory, that is the version of the Eclipse studio packaged and installed with the Android ADT. Using THAT shortcut to Eclipse, an Android project opens and runs (and edits) as a native Android project using appropriate Android tools.
答案是右键单击并选择打开默认编辑器...然后在编辑器底部右下角的两个选项卡将发生变化。单击图形编辑器。
The answer is to right-click and select open DEFAULT Editor...Then on bottom of editor two tabs will change on the lower right. Click on Graphical Editor.
已解决安装 ADT http://developer.android.com/sdk/installing/installing- adt.html
这包含所有预览布局和 XML 编辑器
Resolved installation ADT http://developer.android.com/sdk/installing/installing-adt.html
This contain all preview layout and XML editor
您还可以在左侧的项目资源管理器中,转到 res、layout 并双击 Activity_main.xml
You can also, in the project explorer on the left, go to res, layout and double click on activity_main.xml