Android Smack 聊天客户端

标签 android smack

嗨, friend 们,我正在使用从以下网址下载的 Smack3.2.1.jar

http://www.igniterealtime.org/downloads/index.jsp

我在我的构建路径中添加了 jar 但是当我运行应用程序时,我得到以下错误日志

10-12 13:11:59.464: ERROR/AndroidRuntime(1957): FATAL EXCEPTION: main
10-12 13:11:59.464: ERROR/AndroidRuntime(1957): java.lang.VerifyError: org.jivesoftware.smack.sasl.SASLMechanism
10-12 13:11:59.464: ERROR/AndroidRuntime(1957):     at java.lang.Class.getDeclaredConstructors(Native Method)
10-12 13:11:59.464: ERROR/AndroidRuntime(1957):     at java.lang.Class.getConstructor(Class.java:477)
10-12 13:11:59.464: ERROR/AndroidRuntime(1957):     at org.jivesoftware.smack.SASLAuthentication.authenticate(SASLAuthentication.java:314)
10-12 13:11:59.464: ERROR/AndroidRuntime(1957):     at org.jivesoftware.smack.XMPPConnection.login(XMPPConnection.java:203)
10-12 13:11:59.464: ERROR/AndroidRuntime(1957):     at org.jivesoftware.smack.Connection.login(Connection.java:348)
10-12 13:11:59.464: ERROR/AndroidRuntime(1957):     at org.apache.android.xmpp.SettingsDialog.onClick(SettingsDialog.java:54)
10-12 13:11:59.464: ERROR/AndroidRuntime(1957):     at android.view.View.performClick(View.java:2408)
10-12 13:11:59.464: ERROR/AndroidRuntime(1957):     at android.view.View$PerformClick.run(View.java:8816)
10-12 13:11:59.464: ERROR/AndroidRuntime(1957):     at android.os.Handler.handleCallback(Handler.java:587)
10-12 13:11:59.464: ERROR/AndroidRuntime(1957):     at android.os.Handler.dispatchMessage(Handler.java:92)
10-12 13:11:59.464: ERROR/AndroidRuntime(1957):     at android.os.Looper.loop(Looper.java:123)
10-12 13:11:59.464: ERROR/AndroidRuntime(1957):     at android.app.ActivityThread.main(ActivityThread.java:4627)
10-12 13:11:59.464: ERROR/AndroidRuntime(1957):     at java.lang.reflect.Method.invokeNative(Native Method)
10-12 13:11:59.464: ERROR/AndroidRuntime(1957):     at java.lang.reflect.Method.invoke(Method.java:521)
10-12 13:11:59.464: ERROR/AndroidRuntime(1957):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
10-12 13:11:59.464: ERROR/AndroidRuntime(1957):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
10-12 13:11:59.464: ERROR/AndroidRuntime(1957):     at dalvik.system.NativeStart.main(Native Method)

谁能帮忙...

最佳答案

Smack 不能在开箱即用的 android 上运行,您可能需要使用 aSmack ( http://code.google.com/p/asmack/ ),它是 smack 的 Android 端口。

关于Android Smack 聊天客户端,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7736861/

相关文章:

android - android webview中的HTML文件输入(android 4.4,kitkat)

android - 无法使用 smack 接收群组消息

android - 在 android smack 4.1 中接收重复消息

xmpp - 如何监听我的名册条目的 vcard 更改

android - 发送自定义 IQ 查询 (Android)(Smack)

Android 从包管理器获取应用自适应图标

android - 在android中根据周围的光线改变亮度

Android - 相机和 OpenGL ES

android - 应用程序崩溃-空指针异常[Android]

eclipse - Java XMPP clint 与 smack 4.1 NoClassDefFoundError :