title: Trying to connect to XMPP server with aSmack on Android gets me "no dns resolver active"
body: <p>I made this as simple as I can in code. I am using asmack library for android in version 8-0.8.3.</p>
  
  <p>My code:</p>
  
  <pre><code>package info.zajacmp3.servercommunication;
  
  import org.jivesoftware.smack.Connection;
  import org.jivesoftware.smack.XMPPConnection;
  import org.jivesoftware.smack.XMPPException;
  
  import android.app.Service;
  import android.content.Intent;
  import android.os.IBinder;
  
  public class XmppService extends Service{
  
  
  
      public void xmppService() throws XMPPException {
  
          Connection conn1 = new XMPPConnection("jabber.org");
          conn1.connect();
      }
  
  
      @Override
      public void onCreate(){
          //TODO:actions to perform when service is created
          try {
              xmppService();
          } catch (XMPPException e) {
              // TODO Auto-generated catch block
              e.printStackTrace();
          }
      }
  
      @Override
      public IBinder onBind(Intent intent) {
          // TODO Replace with service binding
          return null;
      }
  }
  </code></pre>
  
  <p>It freeze my app and cause me and error: no dns resolver active. There is nothing on the web about it.</p>
  
  <p>I do really hope to get some help or clues.</p>
  
  <p>Also tried like this:</p>
  
  <p>private final static String server_host = "jabber.org";
  private final static int SERVER_PORT = 5222;</p>
  
  <p>public void xmppService() throws XMPPException {</p>
  
  <pre><code>ConnectionConfiguration config = new ConnectionConfiguration( server_host, SERVER_PORT);
  XMPPConnection m_connection = new XMPPConnection(config);
          try {
               SASLAuthentication.supportSASLMechanism("PLAIN");
               config.setSASLAuthenticationEnabled(true);     
               m_connection.connect();
              Roster.setDefaultSubscriptionMode(Roster.SubscriptionMode.manual);
          } catch (XMPPException e) {
              e.printStackTrace();
          } 
  </code></pre>
  
  <p>}</p>
  
  <p>@UPDATE:</p>
  
  <p>Using smack library instead of asmack gets me the same problem.
  I get no error log, but after disconnecting debugger I get:</p>
  
  <p><img src="https://i.stack.imgur.com/DEU5c.png" alt="enter image description here"></p>