带有ADT插件的Eclipse——布局编辑器不显示内容(卡在“加载编辑器”)

时间:2022-09-11 19:43:50

I'm facing a very strange issue on Eclipse with Android ADT plugin.

我在Eclipse上遇到了一个非常奇怪的问题,Android ADT插件。

When I try to open an XML layout file, the result is the one in the screenshot. The Layout editor doesn't show the file name and no content is loaded. The editor stuck on "Loading editor" and if I switch to view, the XML is loaded fine.

当我尝试打开一个XML布局文件时,结果就是屏幕截图中的结果。布局编辑器没有显示文件名,也没有加载内容。编辑器卡在“加载编辑器”上,如果我切换到视图,XML将被加载。

This issue is raising up with every layout file and with every project I open. I tried to:

这个问题在每个布局文件和我打开的每一个项目中都得到了提高。我想:

  • restart Eclipse
  • 重新启动Eclipse
  • update the ADT plugin
  • 更新ADT插件
  • install all the packages and updates from the Android SDK Manager
  • 从Android SDK管理器安装所有的包和更新。

no errors are shown in the console.

控制台不会显示错误。

带有ADT插件的Eclipse——布局编辑器不显示内容(卡在“加载编辑器”)

UPDATE

更新

Now Eclipse is showing a pop-up error "An error has occurred. See error log for more details.java.lang.NullPointerException" when I try to open any Layout XML file.

现在Eclipse显示一个弹出错误“发生了错误”。更多细节请参见错误日志。当我尝试打开任何布局XML文件时。

3 个解决方案

#1


0  

Solution 1

解决方案1

At the right side of the image you attached click the android logo with 19 a drop down list will open select some different version...

在图片的右边,你点击了android的logo,上面有19个下拉列表,你可以选择不同的版本……

selecting 20 works for me

选择20个适合我。

Solution 2

解决方案2

right click layout file in the Package Explorer view and click

在Package Explorer视图中右键单击布局文件并单击。

Open With -> Android Layout Editor

打开-> Android布局编辑器。

#2


0  

  • Right-click on your project and close all unrelated projects. Keep only one project opened at any one time.

    右键单击您的项目并关闭所有不相关的项目。每次只打开一个项目。

  • Close all your perspectives and then open only a Java perspective.

    关闭所有透视图,然后只打开Java透视图。

  • Ensure that there is indeed a UCApplicationTheme that it has access to, otherwise change it to a different theme.

    确保有一个UCApplicationTheme,它可以访问,否则将它更改为一个不同的主题。

  • Restart Eclipse. Then restart your computer.

    重新启动Eclipse。然后重新启动你的计算机。

  • Then try opening a default layout from a newly generated blank Android project. Do not open the layout of a web view, even if you normally develop on Phone Gap/Cordova. Let's eliminate the web view as a possible problem.

    然后尝试从一个新生成的空白Android项目中打开一个默认的布局。不要打开web view的布局,即使你通常在电话隙/Cordova上开发。让我们将web view作为可能的问题消除。

  • When all else fails, reinstall Eclipse, the SDK, and ADT, completely from scratch.

    当所有其他操作都失败时,重新安装Eclipse、SDK和ADT,完全从头开始。

And if you do get a NullPointerException, please be specific. Cut and paste on here the exact error it's giving you.

如果您确实得到了NullPointerException,请详细说明。剪切并粘贴在这里,它给你的准确错误。

#3


0  

The Problem is you did update only android development tools from developer tool.. so you need to update the whole packages which are provided by the eclipse market.. Go to help-->install new software-->add the Repository-->and select all check boxes which are available in the developer tool...

问题是你只更新了开发工具的android开发工具。因此,您需要更新eclipse市场提供的整个包。去帮助——>安装新软件——>添加存储库——>,并选择开发工具中可用的所有复选框……

Its works for me..

它适合我. .

#1


0  

Solution 1

解决方案1

At the right side of the image you attached click the android logo with 19 a drop down list will open select some different version...

在图片的右边,你点击了android的logo,上面有19个下拉列表,你可以选择不同的版本……

selecting 20 works for me

选择20个适合我。

Solution 2

解决方案2

right click layout file in the Package Explorer view and click

在Package Explorer视图中右键单击布局文件并单击。

Open With -> Android Layout Editor

打开-> Android布局编辑器。

#2


0  

  • Right-click on your project and close all unrelated projects. Keep only one project opened at any one time.

    右键单击您的项目并关闭所有不相关的项目。每次只打开一个项目。

  • Close all your perspectives and then open only a Java perspective.

    关闭所有透视图,然后只打开Java透视图。

  • Ensure that there is indeed a UCApplicationTheme that it has access to, otherwise change it to a different theme.

    确保有一个UCApplicationTheme,它可以访问,否则将它更改为一个不同的主题。

  • Restart Eclipse. Then restart your computer.

    重新启动Eclipse。然后重新启动你的计算机。

  • Then try opening a default layout from a newly generated blank Android project. Do not open the layout of a web view, even if you normally develop on Phone Gap/Cordova. Let's eliminate the web view as a possible problem.

    然后尝试从一个新生成的空白Android项目中打开一个默认的布局。不要打开web view的布局,即使你通常在电话隙/Cordova上开发。让我们将web view作为可能的问题消除。

  • When all else fails, reinstall Eclipse, the SDK, and ADT, completely from scratch.

    当所有其他操作都失败时,重新安装Eclipse、SDK和ADT,完全从头开始。

And if you do get a NullPointerException, please be specific. Cut and paste on here the exact error it's giving you.

如果您确实得到了NullPointerException,请详细说明。剪切并粘贴在这里,它给你的准确错误。

#3


0  

The Problem is you did update only android development tools from developer tool.. so you need to update the whole packages which are provided by the eclipse market.. Go to help-->install new software-->add the Repository-->and select all check boxes which are available in the developer tool...

问题是你只更新了开发工具的android开发工具。因此,您需要更新eclipse市场提供的整个包。去帮助——>安装新软件——>添加存储库——>,并选择开发工具中可用的所有复选框……

Its works for me..

它适合我. .