如何修复 NoSuchMethodError? [英] How do I fix a NoSuchMethodError?

查看:34
本文介绍了如何修复 NoSuchMethodError?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在运行 Java 程序时遇到 NoSuchMethodError 错误.出了什么问题,我该如何解决?

I'm getting a NoSuchMethodError error when running my Java program. What's wrong and how do I fix it?

推荐答案

我遇到了你的问题,我就是这样解决的.以下步骤是添加库的有效方法.我已经正确地完成了前两个步骤,但是我没有通过将.jar"文件直接从文件系统拖到我的 eclipse 项目上的lib"文件夹中来完成最后一个步骤.此外,我必须从构建路径和lib"文件夹中删除先前版本的库.

I was having your problem, and this is how I fixed it. The following steps are a working way to add a library. I had done the first two steps right, but I hadn't done the last one by dragging the ".jar" file direct from the file system into the "lib" folder on my eclipse project. Additionally, I had to remove the previous version of the library from both the build path and the "lib" folder.

这篇关于如何修复 NoSuchMethodError?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆