Error : XMPPTCPConnectionConfiguration.builder() hangs in Android Smack 4.2.0-alpha1

Hi everyone,

I’m new to Smack and my sample code hangs at XMPPTCPConnectionConfiguration.builder().

Can anyone help me ?

  1. Environment :
  • Android Studio

  • Android Smack 4.2.0-alpha1

. I have copied the source code from the Maven Central Repository and used source code instead of jar files.

The related jar files are as follows.


The final jar files that are as follows.


2-1) A simple ActionBarActivity demo program


2-2) Debug-trace: Step-Into XMPPTCPConnectionConfiguration.builder()


2-3) Debug-trace: Step-Into ConnectionConfiguration => SmackConfiguration.getVersion()


2-4) Step-over => ZygoteInit ???) => The demo program is destroyed

Thanks & Regards,

. I have copied the source code from the Maven Central Repository and used source code instead of jar files.
Why didn’t you simply configure Smack as dependency?

I wanted to debug trace the smack source code because the program hangs and I don’t know the cause of the problem.

The result will be the same (exception) even though I goes back again to configure Smack as dependency.

Even though I have changed to the source code, the Android Studio IDE doesn’t detect the exact location of the error.

Only finally ZygoteInit ???. I don’t know why.

My advice is not not use Android Studio if you want to debug 3rd party libraries which come with source attachments until Issue 59220 - android - Automatic source attachment for gradle dependencies - Android Open Source Project - Issue Tra… is fixed. Which, judging how Google has handled the bug in the past, will take something like at least 1 years until it’s supported.

Use Eclipse with Android ADT and my MavenToAndroidAnt script to create Android projects using libraries with source attachments. That’s how I develop my Android Apps that use Smack (and other FOSS libraries), as this setup allows me to debug the code, including the source of the libraries where the source is available.

Thanks for the tips.

I will try with those : Android ADT + MavenToAndroidAnt script.

I will close this discussion because there was no error in smack 4.2.0-alpha1.

The problem happened because I have commented out the following line because of compile error.

I have enabled it again.


For source tracing, I will follow your guide. (Android ADT + MavenToAndroidAnt script)

And finally I have a question. Can you guide how to debug not-authorized (MD5) problem ?


  1. Now I can connect & login to the open fire server only with PLAIN Mechanism. (Smack 4.1.0 + Android 4.4 SmartPhone)

    (I have disabled DIGEST-MD5 Mechanism). //SASLAuthentication.blacklistSASLMechanism(“DIGEST-MD5”);

  2. If I remove DIGEST-MD5 from blacklist, login fails with the following logs.

D/SMACK﹕ SENT (0): =

D/SMACK﹕ RECV (0): cmVhbG09ImJsdWVza3ktc3I3MHMiLG5vbmNlPS IvbUpHbDVZZUZ4R3BPSC9jT3JlbWl2bmZpV3R2SmxJSktLNHFTOHN5Iixxb3A9ImF1dGgiLGNoYXJ



HN5Iixjbm9uY2U9Ijc5clF2UVVKRm1pNmdZY3ZHMHNZODFhaENxV2tuUTZWIixuYz0wMDAwMDAwMSxx b3A9YXV0aCxkaWdlc3QtdXJpPSJ4bXBwLzE5Mi4xNjguMjE5LjE5MyIscmVzcG9uc2U9ZGU3MjA2OWQz Y2Q0Mjg3NDE3MWJiZjk



  1. sample code

XMPPTCPConnectionConfiguration.Builder builder = XMPPTCPConnectionConfiguration.builder();





builder.setUsernameAndPassword(mUsername, mPassword);



mConnection = new XMPPTCPConnection(;



Can you guide how to debug not-authorized (MD5) problem ?
Those are a bit complex to debug. Starting to debug on the server side, e.g. which condition exactly triggers the not-authorized, is sometimes the best approach. Also those are often caused by a mismatch of the configured XMPP domain/service name between client and server.


I will close this discussion.