安卓:Eclipse的自动完成没有在XML文件中工作自动完成、文件、工作、Eclipse

2023-09-13 00:40:08 作者:活该孤独

我看到一个奇怪的问题,我的Eclipse IDE的Andr​​oid开发。

I am seeing a strange problem with my Eclipse IDE for Android development.

自动完成不,当我在为我的布局在main.xml中的文件按Ctrl +空格的工作。在左下角,我得到一个消息,说例如LinearLayout中未找到。

Autocompletion does not work when I hit Ctrl + Space in the main.xml file for my layouts. In the bottom left, I get a message saying for example "LinearLayout not found".

我也有我的文件中指定正确的命名空间。

I also have the correct namespace specified in my file.

它的工作,虽然其他的XML文件,比如我的strings.xml,我觉得很奇怪。

It does work though for other xml files, such as my strings.xml which I find strange.

这是因为我想很容易看到的视图或布局中所有可用选项的烦恼。

This is an annoyance as I'd like to easily see all the options available for a View or Layout.

任何人有关于如何解决这个任何想法?

Anyone got any ideas on how to resolve this?

推荐答案

请检查该文件是在Android XML布局编辑器被打开(不只是普通的XML编辑器)。用鼠标右键单击该文件,选择打开以,然后选择 Android的布局编辑器

Check that the file is being opened in the Android XML Layout editor (not just the "plain" XML editor). Right-click the file, choose Open With, and select Android Layout Editor.