gpt4 book ai didi

eclipse - Eclipse CDT 认为它已损坏

转载 作者:行者123 更新时间:2023-12-02 16:52:11 24 4
gpt4 key购买 nike

我正在使用 Eclipse 进行一些嵌入式开发,最近每次保存文件或进行构建时都会出现这些错误。这很烦人,但在大多数情况下,它似乎不会造成任何问题(它甚至仍然突出显示源中的警告/错误。这里发生了什么?

Plug-in org.eclipse.cdt.cross.arm.gnu was unable to load class 
org.eclipse.cdt.managedbuilder.internal.scannerconfig.DefaultGnuWinScannerInfoCollector.

Plug-in org.eclipse.cdt.cross.arm.gnu was unable to load class
org.eclipse.cdt.managedbuilder.internal.scannerconfig.ManagedGCCScannerInfoConsoleParser

最佳答案

看起来像eclipse wiki FAQ says

The most likely reason is that an exception was thrown in the static initializer for a class declared by the offending plug-in. Check the .log file to see whether that indeed happened.
The Eclipse Platform loader will not load a plug-in when exceptions are thrown during the initialization of the Java classes that make up the plug-in.

Another common reason for this error is the lack of an appropriate constructor for the class being loaded. Most classes declared in extension points must have a public zero-argument constructor. Check the extension point documentation to see what constructor is required for the classes that you declare in an extension.

<小时/>

If the problem only occurs when deploying a packaged plug-in (i.e., when it is not started in a runtime workbench via PDE) it is usually a good idea to check the Bundle-ClassPath attribute in the MANIFEST.MF file.
The JAR file that contains the plug-in classes must be listed in the Bundle-ClassPath. Even if the plug-in's proper classes are all listed, class loading may still fail because a .class file may contain references to other classes that cannot be resolved at runtime. In this case, the missing classes need to be identified (usually by looking at the import statements of the problematic class) and the necessary entries need to be added to the Bundle-ClassPath. If additional JAR files are required, those JARs also need to be listed in the build.properties file so that they are included when the plug-in is packaged.

(请参阅 this thread 作为最后一点的说明)

<小时/>

例如,在 this thread 中,对于eclipse3.0时代的另一个问题:

The plugin.xml file specifies "org.eclipse.core.runtime.compatablity" as a required plugin. However, I am using Eclipse Version 3.0.1 and should be using "org.eclipse.core.runtime_3.0.1".

Solution:

Replace the line in the Plugin.xml

<import plugin="org.eclipse.core.runtime.compatability"/>

with

<import plugin="org.eclipse.core.runtime"/>

关于eclipse - Eclipse CDT 认为它已损坏,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1617151/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com