问题描述
错误栈java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String com.easemob.chat.core.j$a.a()' on a null object reference at com.easemob.chat.core.l.c(Unknown Source) at com.easemob.chat.core.l.b(Unknown Source) at com.easemob.chat.core.n.b(Unknown Source) at com.easemob.chat.core.j.b(Unknown Source) at com.easemob.chat.core.EMConnectionManager.initConnectionConfig(Unknown Source) at com.easemob.chat.core.EMConnectionManager.onInit(Unknown Source) at com.easemob.chat.core.EMConnectionManager.onInit(Unknown Source) at com.easemob.chat.EMSessionManager.initXmppConnection(Unknown Source) at com.easemob.chat.EMSessionManager.loginSync(Unknown Source) at com.easemob.chat.EMSessionManager.access$0(Unknown Source) at com.easemob.chat.EMSessionManager$1.run(Unknown Source)
解决方案
还有另外的堆栈信息:java.lang.IllegalStateException: java.lang.IllegalArgumentException: FQDN is null at org.jivesoftware.smack.ConnectionConfiguration.initHostAddresses(Unknown Source) at org.jivesoftware.smack.ConnectionConfiguration.<init>(Unknown Source) at com.easemob.chat.core.EMConnectionManager.initConnectionConfig(Unknown Source) at com.easemob.chat.core.EMConnectionManager.onInit(Unknown Source) at com.easemob.chat.core.EMConnectionManager.onInit(Unknown Source) at com.easemob.chat.EMSessionManager.initXmppConnection(Unknown Source) at com.easemob.chat.EMSessionManager.loginSync(Unknown Source) at com.easemob.chat.EMSessionManager.access$0(Unknown Source) at com.easemob.chat.EMSessionManager$1.run(Unknown Source) Caused by: java.lang.IllegalArgumentException: FQDN is null at org.jivesoftware.smack.util.dns.HostAddress.<init>(Unknown Source) at org.jivesoftware.smack.util.dns.HostAddress.<init>(Unknown Source) ... 9 more java.lang.IllegalArgumentException: FQDN is null at org.jivesoftware.smack.util.dns.HostAddress.<init>(Unknown Source) at org.jivesoftware.smack.util.dns.HostAddress.<init>(Unknown Source) at org.jivesoftware.smack.ConnectionConfiguration.initHostAddresses(Unknown Source) at org.jivesoftware.smack.ConnectionConfiguration.<init>(Unknown Source) at com.easemob.chat.core.EMConnectionManager.initConnectionConfig(Unknown Source) at com.easemob.chat.core.EMConnectionManager.onInit(Unknown Source) at com.easemob.chat.core.EMConnectionManager.onInit(Unknown Source) at com.easemob.chat.EMSessionManager.initXmppConnection(Unknown Source) at com.easemob.chat.EMSessionManager.loginSync(Unknown Source) at com.easemob.chat.EMSessionManager.access$0(Unknown Source) at com.easemob.chat.EMSessionManager$1.run(Unknown Source)