[英]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.