Tycho 无法解析间接引用的 SWT 依赖项

编程入门 行业动态 更新时间:2024-10-25 11:25:35
本文介绍了Tycho 无法解析间接引用的 SWT 依赖项的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

问题可能与 这个问题,但那里提供的解决方案在过去 8 年中变得不适用.

The problem is probably the same as in this question, but the solution offered there has become inapplicable in the last 8 years.

我有一个 Eclipse RCP 项目,该项目正在转换为使用 Tycho(2.3.0 版).该项目可以与 Eclipse 2019-06 和为此项目构建的自定义目标平台一起运行.

I have an Eclipse RCP project which is in the process of being transformed to use Tycho (version 2.3.0) instead. The project can be run with Eclipse 2019-06 and the custom target platform built for this project.

然后我用相同的目标平台(一个单独的 Maven 模块引用 Eclipse 使用的相同 *.target 文件)设置 Tycho.

Then I have set up Tycho with the same target platform (a separate Maven module referencing the same *.target file used by Eclipse).

但是当我使用通常的全新安装"运行 Maven(版本 3.6.3)时目标,我收到此错误消息:

But then when I run Maven (version 3.6.3) with the usual "clean install" goals, I get this error message:

[ERROR] Failed to execute goal org.eclipse.tycho:tycho-compiler-plugin:2.3.0:compile (default-compile) on project my.project.module: Compilation failure: Compilation failure: [ERROR] C:\path\to\a\source\file\in\a\module.java: [ERROR] /* [ERROR] ^ [ERROR] The type org.eclipse.swt.widgets.Event cannot be resolved. It is indirectly referenced from required .class files

目标平台为 Eclipse 和 Tycho 以及两个 SWT .jar 文件(org.eclipse.swt_3.111.0.v20190605-1801.jar 和 org.eclipse.swt.win32.win32.x86_64_3.111.0.v20190605-1801.jar) 位于构成目标平台的目录之一中.

The target platform specifies the same environment (win32.win32.x86_64) for both Eclipse and Tycho, and both SWT .jar files (org.eclipse.swt_3.111.0.v20190605-1801.jar and org.eclipse.swt.win32.win32.x86_64_3.111.0.v20190605-1801.jar) are in one of the directories making up the target platform.

推荐答案

添加后

jars.extra.classpath = platform:/plugin/org.eclipse.swt.win32.win32.x86_64

到 build.properties 文件(按照推荐的 这里)问题就解决了.

to the build.properties file (as recommended here) the problem is gone.

更多推荐

Tycho 无法解析间接引用的 SWT 依赖项

本文发布于:2023-11-04 01:10:24,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1556547.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:Tycho   SWT

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!