2

我正在开发一个 j2me 应用程序 - 它在模拟器和大多数手机上运行良好,但在 2 台诺基亚设备上(均在 ARM CPU 中具有 h/w java 加速)我在启动 midlet 时出现此错误:

java/lang/NoSuchMethodError: 没有这样的方法 a.()I.

禁用混淆器没有帮助。相同的混淆或非混淆 jar 适用于模拟器和其他手机。我不知道如何调试这个问题以及可能是什么原因。有任何想法吗?

如果这很重要,我正在使用 j2me Polish 框架,但失败发生在我的一个类中(我在禁用混淆器时看到它)。

4

2 回答 2

1

A NoSuchMethodError means that you're trying to call a method that doesn't exist (that is, the class which is supposed to contain that method was loaded successfully, but it doesn't have that method definition). It usually happens when you're compiling against some library, then running with a different version of the library. It's also possible to cause it when you remove a method from your code, then fail to re-compile the classes which use this method.

于 2010-08-18T21:28:58.763 回答
0

将我的问题的根源添加到@Mike 的答案中,以防其他人遇到类似情况:

我有一个依赖于另一个项目的 Eclipse 项目。这两个项目都依赖于一个公共库,我无意中更新了一个项目的库版本,但没有更新另一个项目。

于 2011-06-19T15:03:39.890 回答