我可以在 Windows 8.1 上构建该项目。当尝试使用 Ubuntu 时,我收到此错误消息
Description Resource Path Location Type
The method interpolateLocal(Vector2f, Vector2f, float) is undefined for the type Vector2f NavMesh.java /spaceworld/src/jme3tools/navmesh line 230 Java Problem
有问题的代码不是我的。
if (d1 < d2){
intersectionPoint.interpolateLocal(wall.getPointA(), wall.getPointB(), distBlend);
newWayPoint = new Vector3f(intersectionPoint.x, 0, intersectionPoint.y);
}else{
intersectionPoint.interpolateLocal(wall.getPointB(), wall.getPointA(), distBlend);
newWayPoint = new Vector3f(intersectionPoint.x, 0, intersectionPoint.y);
}
我已经包含了 cai-nmgen-0.1.2.jar 和 jme3 jar,就像我在 Windows 上所做的那样,以使其工作。为什么无法构建?
最佳答案
根据Vector3f and interpolate vs. interpolateLocal博客文章,在 jme3
库的 3.0.10 版本和 3.1 版本之间,此方法似乎发生了一些重大更改。
因此,您最好检查您在 Windows 8.1 上使用的版本,并确定较旧的依赖项(或某些其他包传递依赖项)是否以某种方式存在于构建路径中。
同时在您的 Ubuntu 上尝试使用 jme3
库版本 3.0.x 的代码
关于java - 如何解决我的构建错误?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29694073/