AnsweredAssumed Answered

error when connect using smack-4.2.0-beta2

Question asked by ztwe on Jun 2, 2016

java.lang.NoClassDefFoundError: org.xbill.DNS.Lookup

  at org.jivesoftware.smack.util.dns.dnsjava.DNSJavaResolver.lookupSRVRecords(DNSJav aResolver.java:47)

  at org.jivesoftware.smack.util.DNSUtil.resolveDomain(DNSUtil.java:171)

  at org.jivesoftware.smack.util.DNSUtil.resolveXMPPServiceDomain(DNSUtil.java:120)

  at org.jivesoftware.smack.AbstractXMPPConnection.populateHostAddresses(AbstractXMP PConnection.java:593)

  at org.jivesoftware.smack.tcp.XMPPTCPConnection.connectUsingConfiguration(XMPPTCPC onnection.java:545)

  at org.jivesoftware.smack.tcp.XMPPTCPConnection.connectInternal(XMPPTCPConnection. java:852)

  at org.jivesoftware.smack.AbstractXMPPConnection.connect(AbstractXMPPConnection.ja va:371)

 

I have built a smack-resolver-dnsjava.jar.But Android Studio shows that error.

Then I download org.xbill.dns_2.1.7.jar and include it in my application project. The error still exists.

Outcomes