3

我在让 ZeroMQ 在 android 上工作时遇到问题。我将所有内容编译到我需要的 .jar 和 .so 文件中。然后我添加zmq.jar/libs/libjzmq.soto/libs/armeabi/并添加.jar到构建路径。( right-click -> build path -> Configure build path ... -> Libraries -> Add JARs...)

我还在“ Order and Export”选项卡中标记了要导出的 .jar,并将其移至列表顶部,但我仍然得到“ java.lang.NoClassDefFoundError: org.zeromq.ZMQ”。

我还能尝试什么?

顺便说一句,我正在使用 Eclipse。

提前致谢。

4

2 回答 2

1

This is not a proper answer to your direct question as I was unable to solve the same problem. Recently I came across JeroMQ on the mailing list and am now using it in an internal application for instant messaging. It is working very well but requires ZeroMQ 3.x. ZeroMQ is very easy to install so that should not be a blocking issue.

Take a look at the GitHub repo here: https://github.com/miniway/jeromq

If you are using Git, you can add that as a submodule or you can simply pull the code and add it into your main app. I would highly recommend the former, but I ended up doing the latter simply to get my test app up and running easier.

于 2012-09-26T01:46:17.597 回答
0

我也遇到了问题!它对我有用的方式是在 Preferences->Java Build Path->Orders and Export 中设置包顺序。选中zmq.jar的复选框,然后点击'up'按钮使其在列表的第一行,然后错误愉快地消失了,希望这对你有帮助:)

于 2013-05-27T09:17:00.140 回答