0

我一直在使用蒸汽冷凝器,并制作了一个 android 应用程序来测试一些小问题,例如获取成就,但在.jar文件中的一个类中遇到了问题。

该方法从找到的 at导入org.json.JSONObject并调用该方法。编译时没有错误,但是当我运行应用程序并执行该方法时,它似乎指向了没有方法的默认Android 。getNames()json-java.jarjson.orgorg.json.JSONObjectgetNames()

错误可以在这里看到:

05-01 13:08:47.869: W/dalvikvm(1012): VFY: unable to resolve static method 13252: Lorg/json/JSONObject;.getNames (Lorg/json/JSONObject;)[Ljava/lang/String;

这最终会导致运行时错误并停止应用程序。有没有办法确保app/steam-condenser.jar导入正确的库?

4

1 回答 1

0

Can't help you much without posting your code.

A quick guess would be your external JAR library is not being exported. In Eclipse,

right-click the project->Properties->Java Build Path->Order and Export

Be sure that your jar has a check by it, meaning that it is exported with your apk.

于 2014-05-01T17:39:29.740 回答