简体   繁体   English

导入/依赖无法在Maven中解决

[英]Import / Dependency Cannot be Resolved in Maven

I'm using a program that relies on the following two imports: 我正在使用一个依赖于以下两个导入的程序:

import org.lwjgl.opencl.CLDevice;
import org.lwjgl.opencl.CLPlatform;

Eclipse is reporting that the "import cannot be resolved" even though I've added LWJGL OpenCL as a dependency to my project. 虽然我已经将LWJGL OpenCL作为依赖项添加到我的项目中,但Eclipse报告“导入无法解析”。

Here's a snapshot of my POM file: 这是我的POM文件的快照:

<dependency>
    <groupId>org.lwjgl</groupId>
    <artifactId>lwjgl-opencl</artifactId>
    <version>3.1.6</version>
</dependency>

I've read somewhere that these classes only exist in an earlier version so I tried changing the version to all of the versions found here ( from 3.1.0 to 3.1.6) but none of them resolved the issue. 我已经读过某些地方,这些类只存在于早期版本中,所以我尝试将版本更改为此处找到的所有版本(从3.1.0到3.1.6),但没有一个解决了这个问题。

Is there an earlier/different version that is not on the Maven repository page? 是否存在Maven存储库页面上没有的早期/不同版本? If not where could I find the said class? 如果不是我在哪里可以找到上述课程?

Thanks 谢谢

It seems that you are using the abandoned lwjgl v2 library. 您似乎正在使用废弃的lwjgl v2库。 It can be found in another Maven repository: 它可以在另一个Maven存储库中找到:

<dependency>
    <groupId>org.lwjgl.lwjgl</groupId>
    <artifactId>lwjgl</artifactId>
    <version>2.9.3</version>
</dependency>

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM