Eclipse中的红色感叹号图标是什么意思?

发布于 2024-11-01 04:55:41 字数 372 浏览 1 评论 0原文

Eclipse中的红色感叹号图标是什么意思?互联网上有很多关于“红色感叹号图标”、“红色感叹号装饰器”和“红色爆炸图标”的不同搜索结果,毫无疑问,因为许多插件和编程相关工具都使用红色感叹号图标。因此,需要明确的是,这就是我的意思:

红色感叹号图标的屏幕截图

它在项目上显示为装饰器在包资源管理器视图中。

就我而言,当填充缺少的构建路径变量时,该图标消失了。我使用的是 MyEclipse 9.0,但我不认为这是特定于 MyEclipse 的。互联网上的其他人报告说,这与其他问题有关,包括 Subclipse、.svn 文件夹以及在工作副本之间移动文件。

What does the red exclamation point icon in Eclipse mean? There are lots of different search results on the Internet about "red exclamation point icons" and "red exclamation mark decorators" and "red bang icons," no doubt because lots of plugins and programming-related tools use red exclamation point icons. So, to be clear, this is the one I mean:

screenshot of red exclamation point icon

It appears as a decorator on projects in the Package Explorer view.

In my case, the icon went away when a missing build path variable was filled in. I'm using MyEclipse 9.0, but I don't think this is MyEclipse-specific. Other people on the Internet have reported that it has to do with other issues, including Subclipse, the .svn folder and moving files between working copies.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(11

第七度阳光i 2024-11-08 04:55:41

根据 文档

装饰Java项目并工作
包含构建路径错误的集

在实践中,我发现“构建路径错误”可能是由多种原因引起的,具体取决于哪些插件处于活动状态。检查“问题”视图以获取更多信息。

According to the documentation:

Decorates Java projects and working
sets that contain build path errors

In practice, I've found that a "build path error" may be caused by any number of reasons, depending on what plugins are active. Check the "Problems" view for more information.

jJeQQOZ5 2024-11-08 04:55:41

这意味着您的项目中的构建路径有问题。如果它是一个android项目,那么这主要意味着找不到project.properties文件中指定的目标值。这也可能是由于其他类型的内置问题引起的。但它主要仅针对构建问题显示。请参阅此处了解更多细节。这是关于在 Eclipse 中看到的内置错误装饰器。

该页面的摘录:

构建路径问题有时很容易在项目中的其他问题中被忽略。 Package Explorer 和 Project Explorer 视图现在在包含构建路径错误的 Java 项目和工作集上显示一个新的装饰器:

在此处输入图像描述

具体错误可以在问题视图中看到,如果打开视图菜单并选择分组依据 > Java 问题类型,它们都显示在“构建路径”类别中:

在此处输入图像描述

It means there is a problem with the build path in your project. If it is an android project then it mostly means the target value specified in project.properties file cannot be found. This can also be caused because of other kinds of built problems. But it is shown mostly for built problems only. See here for more details. It is about built error decorater seen in eclipse.

An extract from that page:

Build path problems are sometimes easy to miss among other problems in a project. The Package Explorer and Project Explorer views now show a new decorator on Java projects and working sets that contain build path errors:

enter image description here

The concrete errors can be seen in the Problems view, and if you open the view menu and select Group By > Java Problem Type, they all show up in the Build Path category:

enter image description here

抠脚大汉 2024-11-08 04:55:41

当我尝试将源文件和 JAR 文件从一台机器导入到另一台机器时,我也遇到了类似的问题。与旧机器相比,新机器上的 JAR 路径不同。我解决如下

  1. 右键单击“项目名称”
  2. 选择“构建路径”
  3. 然后选择“配置构建路径”
  4. 单击“库”
  5. 删除所有引用旧路径的库

然后,“项目名称”上的感叹号”被删除。

I also faced a similar problem when i tried to import Source file and JAR file from one machine to another machine. The path of the JAR was different on new machine compared to old machine. I resolved it as belows

  1. Right click on the "Project name"
  2. Select "Build path"
  3. Then select "Configure Build Path"
  4. Click on "Libraries"
  5. Remove all the libraries which were referring to old path

Then, the exclamation symbol on the "Project name" was removed.

娇柔作态 2024-11-08 04:55:41

可能有几个原因。大多数时候可能是以下一些原因,

  1. 您从/lib文件夹中删除了一些.jar文件
  2. 您添加了新的.jar文件
  3. 您添加了可能与其他文件冲突的新.jar文件

那么该怎么办我们要做的就是解决那些丢失/更新/新添加的 jar 文件。

  1. 右键单击项目并转到属性
  2. 选择Java 构建路径
  3. 转到选项卡
  4. 删除已删除的 jar 文件引用。它们附近会有一个红色标记,以便您可以轻松识别它们。
  5. 使用添加 JAR 添加对新添加的 .jar 文件的引用
  6. 刷新项目

如果是由于上述原因之一,这将解决问题。

There can be several reasons. Most of the times it may be some of the below reasons ,

  1. You have deleted some of the .jar files from your /lib folder
  2. You have added new .jar files
  3. you have added new .jar files which may be conflict with others

So what to do is we have to resolve those missing / updating / newly_added jar files.

  1. right click on the project and go to properties
  2. Select Java Build Path
  3. go to the Libraries tab
  4. Remove the jar file references which you have removed already. There will be a red mark near them so you can identify them easily.
  5. Add the references to the newly added .jar files by using Add JARs
  6. Refresh the project

This will solve the problem if it's because one of the above reasons.

小女人ら 2024-11-08 04:55:41

我发现了另一种可能出现红色感叹号的场景。我将一个目录从一个项目复制到另一个项目。该目录包含一个隐藏的 .svn 目录(原始项目已提交版本控制)。当我将新项目签入 SVN 时,复制的目录仍然包含旧的 SVN 信息,错误地将其自身标识为原始项目中的元素。

我通过查看目录的属性、选择 SVN 信息并查看资源 URL 发现了该问题。我通过删除复制目录的隐藏 .svn 目录并刷新我的项目解决了该问题。红色感叹号消失了,我能够正确检查目录及其内容。

I found another scenario in which the red exclamation mark might appear. I copied a directory from one project to another. This directory included a hidden .svn directory (the original project had been committed to version control). When I checked my new project into SVN, the copied directory still contained the old SVN information, incorrectly identifying itself as an element in its original project.

I discovered the problem by looking at the Properties for the directory, selecting SVN Info, and reviewing the Resource URL. I fixed the problem by deleting the hidden .svn directory for my copied directory and refreshing my project. The red exclamation mark disappeared, and I was able to check in the directory and its contents correctly.

私野 2024-11-08 04:55:41

我所做的很奇怪,但不知何故它解决了问题。选择任何项目并对 build.properties 文件执行虚假编辑(例如,添加和删除空格,然后保存文件)。清理并重建工作区中的项目。

希望这能解决您的一些问题。

What I did was peculiar but somehow it fixed the problem. Pick any project and perform a fake edit of the build.properties file (e.g., add and remove a space and then save the file). Clean and rebuild the projects in your workspace.

Hope this solve some of your problems.

习惯成性 2024-11-08 04:55:41

确保没有任何未定义的类路径变量(如 M2_REPO)。

Make sure you don't have any undefined classpath variables (like M2_REPO).

风为裳 2024-11-08 04:55:41

我遇到了同样的问题,安德鲁是正确的。检查您的类路径变量“M2_REPO”。它可能指向您本地 Maven 存储库的无效位置。

就我而言,我在命令行上使用 mvn eclipse:eclipse 并且该插件正在设置 M2_REPO 类路径变量。 Eclipse 在我的主目录中找不到我的 maven settings.xml,因此 M2_REPO 类路径变量不正确。我的解决方案是重新启动 eclipse,它会获取我的 settings.xml 并删除我项目上的红色感叹号。

我从这个人那里得到了更多信息:
http://www.mkyong.com/ maven/如何配置-m2_repo-variable-in-eclipse-ide/

I had the same problem and Andrew is correct. Check your classpath variable "M2_REPO". It probably points to an invalid location of your local maven repo.

In my case I was using mvn eclipse:eclipse on the command line and this plugin was setting the M2_REPO classpath variable. Eclipse couldn't find my maven settings.xml in my home directory and as a result was incorrectly the M2_REPO classpath variable. My solution was to restart eclipse and it picked up my settings.xml and removed the red exclamation on my projects.

I got some more information from this guy:
http://www.mkyong.com/maven/how-to-configure-m2_repo-variable-in-eclipse-ide/

成熟的代价 2024-11-08 04:55:41

对我有用的解决方案是 Steve Hansen Smythe 给出的以下解决方案。我只是把它粘贴在这里。谢谢史蒂夫。

“我发现了另一种情况,可能会出现红色感叹号。我将一个目录从一个项目复制到另一个项目。该目录包含一个隐藏的.svn目录(原始项目已提交版本控制)。当我检查我的新项目时进入 SVN 后,复制的目录仍然包含旧的 SVN 信息,错误地将其自身标识为原始项目中的一个元素,

我通过查看该目录的属性、选择 SVN 信息并查看我修复的资源 URL 发现了该问题。通过删除复制目录的隐藏 .svn 目录并刷新我的项目,红色感叹号消失了,我能够正确签入该目录及其内容。”

The solution that worked for me is the following one given by Steve Hansen Smythe. I am just pasting it here. Thanks Steve.

"I found another scenario in which the red exclamation mark might appear. I copied a directory from one project to another. This directory included a hidden .svn directory (the original project had been committed to version control). When I checked my new project into SVN, the copied directory still contained the old SVN information, incorrectly identifying itself as an element in its original project.

I discovered the problem by looking at the Properties for the directory, selecting SVN Info, and reviewing the Resource URL. I fixed the problem by deleting the hidden .svn directory for my copied directory and refreshing my project. The red exclamation mark disappeared, and I was able to check in the directory and its contents correctly."

顾铮苏瑾 2024-11-08 04:55:41

还要确保“项目”选项卡中没有任何已关闭的项目 ->

https://i.sstatic.net/StGEu.png

Also be sure you dont have any closed project in the Projects tab ->

https://i.sstatic.net/StGEu.png

最初的梦 2024-11-08 04:55:41

对我有用的解决方案是以下给出的解决方案。

我选择了特定项目>右键>构建路径>配置构建路径>图书馆>我注意到 JRE 系统库显示(未绑定),因此..

选择该库>单击删除>单击应用>单击添加库>JRE 系统库>下一步>工作区默认 JRE>单击完成>应用>确定。

现在您将不会在项目中看到这些感叹号图标。

The solution that worked for me is the following one given..

I selected the particular project> right click >Build path>configure Build path> Libraries> I noticed that JRE system Library was showing(Unbound) hence..

selected that Library>click on Remove>click on Apply>click on add Library>JRE system Library>next>workspace default JRE>click on Finish>Apply>ok.

now you will not see these exclamation icon in your project.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文