Caused by: java.lang.NoClassDefFoundError: Failed resolution of: Lorg/jxmpp/util/XmppStringUtils;

客户端登录异常

缺少jar包

compile('org.igniterealtime.smack:smack-android-extensions:4.2.0') {
    exclude group: 'de.measite.minidns'
}
compile('org.igniterealtime.smack:smack-tcp:4.2.0') {
    exclude group: 'de.measite.minidns'
}
compile group: 'de.measite.minidns', name: 'minidns-hla', version: '0.2.2'

You required four extra jar files.

1) jxmpp-core.jar

2) jxmpp-jid.jar

3) jxmpp-stringprep-libidn

4) jxmpp-util-cache

You can download all of them from below link.

https://oss.sonatype.org/content/repositories/releases/org/jxmpp/


12-11 07:34:29.171: E/AndroidRuntime(17961): FATAL EXCEPTION: AsyncTask #4
12-11 07:34:29.171: E/AndroidRuntime(17961): Process: com.wqx.im, PID: 17961
12-11 07:34:29.171: E/AndroidRuntime(17961): java.lang.RuntimeException: An error occured while executing doInBackground()
12-11 07:34:29.171: E/AndroidRuntime(17961): 	at android.os.AsyncTask$3.done(AsyncTask.java:304)
12-11 07:34:29.171: E/AndroidRuntime(17961): 	at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:355)
12-11 07:34:29.171: E/AndroidRuntime(17961): 	at java.util.concurrent.FutureTask.setException(FutureTask.java:222)
12-11 07:34:29.171: E/AndroidRuntime(17961): 	at java.util.concurrent.FutureTask.run(FutureTask.java:242)
12-11 07:34:29.171: E/AndroidRuntime(17961): 	at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:231)
12-11 07:34:29.171: E/AndroidRuntime(17961): 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
12-11 07:34:29.171: E/AndroidRuntime(17961): 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
12-11 07:34:29.171: E/AndroidRuntime(17961): 	at java.lang.Thread.run(Thread.java:818)
12-11 07:34:29.171: E/AndroidRuntime(17961): Caused by: java.lang.NoClassDefFoundError: Failed resolution of: Lorg/jxmpp/util/XmppStringUtils;
12-11 07:34:29.171: E/AndroidRuntime(17961): 	at org.jivesoftware.smack.provider.ProviderManager.getKey(ProviderManager.java:314)
12-11 07:34:29.171: E/AndroidRuntime(17961): 	at org.jivesoftware.smack.provider.ProviderManager.addStreamFeatureProvider(ProviderManager.java:304)
12-11 07:34:29.171: E/AndroidRuntime(17961): 	at org.jivesoftware.smack.provider.ProviderManager.addLoader(ProviderManager.java:140)
12-11 07:34:29.171: E/AndroidRuntime(17961): 	at org.jivesoftware.smack.initializer.UrlInitializer.initialize(UrlInitializer.java:54)
12-11 07:34:29.171: E/AndroidRuntime(17961): 	at org.jivesoftware.smack.SmackInitialization.loadSmackClass(SmackInitialization.java:232)
12-11 07:34:29.171: E/AndroidRuntime(17961): 	at org.jivesoftware.smack.SmackInitialization.parseClassesToLoad(SmackInitialization.java:193)
12-11 07:34:29.171: E/AndroidRuntime(17961): 	at org.jivesoftware.smack.SmackInitialization.processConfigFile(SmackInitialization.java:163)
12-11 07:34:29.171: E/AndroidRuntime(17961): 	at org.jivesoftware.smack.SmackInitialization.processConfigFile(SmackInitialization.java:148)
12-11 07:34:29.171: E/AndroidRuntime(17961): 	at org.jivesoftware.smack.SmackInitialization.(SmackInitialization.java:116)
12-11 07:34:29.171: E/AndroidRuntime(17961): 	at org.jivesoftware.smack.SmackConfiguration.getVersion(SmackConfiguration.java:96)
12-11 07:34:29.171: E/AndroidRuntime(17961): 	at org.jivesoftware.smack.ConnectionConfiguration.(ConnectionConfiguration.java:38)
12-11 07:34:29.171: E/AndroidRuntime(17961): 	at com.wqx.im.utils.ConnectionManager.openConnection(ConnectionManager.java:25)
12-11 07:34:29.171: E/AndroidRuntime(17961): 	at com.wqx.im.utils.ConnectionManager.getConnection(ConnectionManager.java:18)
12-11 07:34:29.171: E/AndroidRuntime(17961): 	at com.wqx.im.activity.LoginActivity$LoginTask.doInBackground(LoginActivity.java:54)
12-11 07:34:29.171: E/AndroidRuntime(17961): 	at com.wqx.im.activity.LoginActivity$LoginTask.doInBackground(LoginActivity.java:1)
12-11 07:34:29.171: E/AndroidRuntime(17961): 	at android.os.AsyncTask$2.call(AsyncTask.java:292)
12-11 07:34:29.171: E/AndroidRuntime(17961): 	at java.util.concurrent.FutureTask.run(FutureTask.java:237)
12-11 07:34:29.171: E/AndroidRuntime(17961): 	... 4 more
12-11 07:34:29.171: E/AndroidRuntime(17961): Caused by: java.lang.ClassNotFoundException: Didn't find class "org.jxmpp.util.XmppStringUtils" on path: DexPathList[[zip file "/data/app/com.wqx.im-2/base.apk"],nativeLibraryDirectories=[/vendor/lib64, /system/lib64]]
12-11 07:34:29.171: E/AndroidRuntime(17961): 	at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
12-11 07:34:29.171: E/AndroidRuntime(17961): 	at java.lang.ClassLoader.loadClass(ClassLoader.java:511)
12-11 07:34:29.171: E/AndroidRuntime(17961): 	at java.lang.ClassLoader.loadClass(ClassLoader.java:469)
12-11 07:34:29.171: E/AndroidRuntime(17961): 	... 21 more
12-11 07:34:29.171: E/AndroidRuntime(17961): 	Suppressed: java.lang.ClassNotFoundException: org.jxmpp.util.XmppStringUtils
12-11 07:34:29.171: E/AndroidRuntime(17961): 		at java.lang.Class.classForName(Native Method)
12-11 07:34:29.171: E/AndroidRuntime(17961): 		at java.lang.BootClassLoader.findClass(ClassLoader.java:781)
12-11 07:34:29.171: E/AndroidRuntime(17961): 		at java.lang.BootClassLoader.loadClass(ClassLoader.java:841)
12-11 07:34:29.171: E/AndroidRuntime(17961): 		at java.lang.ClassLoader.loadClass(ClassLoader.java:504)
12-11 07:34:29.171: E/AndroidRuntime(17961): 		... 22 more
12-11 07:34:29.171: E/AndroidRuntime(17961): 	Caused by: java.lang.NoClassDefFoundError: Class not found using the boot class loader; no stack available

此问题需要下载   jxmpp-core.jar   

参考 下面3个连接

http://stackoverflow.com/questions/30562975/smack-throws-noclassdeffounderror-failed-resolution-of-lorg-jxmpp-util-xmppst

http://blog.csdn.net/piyell/article/details/49641167

http://blog.csdn.net/u013403478/article/details/50612661


下面这两个也贴上(这两个连接对此问题没有太多帮助)

http://stackoverflow.com/questions/29632991/noclassdeffounderror-failed-resolution-of-lorg-apache-http-conn-ssl-defaulthos

http://stackoverflow.com/questions/26100058/smack-4-1-openfire-sample-example


你可能感兴趣的:(java)