简体   繁体   English

如何修复 Eclipse RCP 中的“缺少约束:Import-Package:”和“Require-Bundle”

[英]How to fix "Missing Constraint: Import-Package:" and "Require-Bundle" in Eclipse RCP

I am developing an Eclipse RCP application.我正在开发一个 Eclipse RCP 应用程序。 Therefore I am trying to implement an ISelectionListener.因此我正在尝试实现一个 ISelectionListener。 Therefore I have to import the package "org.eclipse.ui".因此我必须导入包“org.eclipse.ui”。 When i wanted to import the package the error that I have add the package to my project.当我想导入包时,我将包添加到我的项目中的错误。 When I did this an then want to start my Application an Errorwindow like the folowing appears: https://i.stack.imgur.com/kVTAO.png (Sorry my reputation is to low to post some images)当我这样做然后想要启动我的应用程序时,会出现一个错误窗口,如下所示: https ://i.stack.imgur.com/kvTAO.png(对不起,我的声誉很低,无法发布一些图片)
In my case it contains more items but all with the error: "Missing Constraint: Import-Package" or "Required-Bundle".在我的情况下,它包含更多项目,但都带有错误:“缺少约束:导入包”或“必需捆绑包”。 I was trying to add the packages to my manifest file as explained in the error but this does not change anything.我试图按照错误中的说明将包添加到我的清单文件中,但这不会改变任何内容。

Thanks for your help.谢谢你的帮助。

The error you have is about inconsistent set of "Plug-ins" selected for Run/Debug configuration.您遇到的错误是关于为运行/调试配置选择的一组不一致的“插件”。

By default you are running with "all workspace and enabled target plug-ins" that may be not an optimal choice for RCP development.默认情况下,您使用“所有工作区和启用的目标插件”运行,这可能不是 RCP 开发的最佳选择。 You can try to change it to "plug-ins selected below only" and then tune it manually.您可以尝试将其更改为“仅在下面选择的插件”,然后手动调优。

For example you can uncheck everything except plug-ins that declare the product and the application and then use "Add Required Plug-ins" button.例如,您可以取消选中除声明产品和应用程序的插件之外的所有内容,然后使用“添加所需插件”按钮。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 捆绑XYZ无法解决。 原因:缺少约束:导入包:ABC; 无头RCP独立版本中的版本=“1.0.0”错误 - The bundle XYZ could not resolved. Reason: Missing Constraint: Import-Package: ABC; version=“1.0.0” error in headless RCP standalone 在Virgo-Server中无法解决Import-Package.bundle约束中缺少约束的原因 - In Virgo-Server Import-Package could not be resolved.Caused by missing constraint in bundle constraint 从OSGI命令提示符运行OSGI捆绑包:导入包缺少约束 - Running OSGI bundle from OSGI command prompt :Import-package missing constraint 导出Eclipse RCP产品->“未解决的需求:Require-Bundle:org.eclipse.ui.views” - Export Eclipse RCP Product -> “Unresolved requirement: Require-Bundle: org.eclipse.ui.views” 缺少约束:Import-Package:无法启动Activator - Missing Constraint: Import-Package: Not able to start Activator 与 Require-Bundle 相比,我应该更喜欢 Dynamic-Import 吗? - Should I prefer Dynamic-Import over Require-Bundle? 部署Web服务时出错:缺少约束:导入包:org.apache.axis2.databinding; 版本=“ 0.0.0”。 我该如何解决? - Error when deploying a web service: Missing Constraint: Import-Package: org.apache.axis2.databinding; version=“0.0.0”. How can I solve it? 未解决的要求:Require-Bundle:org.eclipse.core.databinding.beans; 束版本=“1.2.200” - Unresolved requirement: Require-Bundle: org.eclipse.core.databinding.beans; bundle-version=“1.2.200” maven-bundle-plugin创建意外的导入包内容 - maven-bundle-plugin Creates unexpected Import-Package content 如何解决要求:导入包: - How to resolve requirement: Import-Package:
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM