Change smack api from 4.1.0 to 4.1.6 and XMPPTCPConnectionConfiguration not working

hi every body

i was developing a chat app using smack 4.1.0 after 2 month developing yesterday i got a **minidns **error , don’t know really why.

there was some comment in web that suggesting to use newer version of smack for handle the problem.

here is by build.gradle before using newer version :

compile "org.igniterealtime.smack:smack-android-extensions:4.1.0"
compile “org.igniterealtime.smack:smack-tcp:4.1.0”

after that i downloaded the last version of smack library which is 4.1.6 (for when i’m writing this) and i added following .jar files to my libs folder :

compile files(‘libs/smack-core-4.1.6.jar’)

compile files(‘libs/smack-android-extensions-4.1.6.jar’)

compile files(‘libs/smack-tcp-4.1.6.jar’)

compile files(‘libs/smack-resolver-minidns-4.1.6.jar’)

compile files(‘libs/smack-im-4.1.6.jar’)

compile files(‘libs/smack-android-4.1.6.jar’)

compile files(‘libs/smack-bosh-4.1.6.jar’)

compile files(‘libs/smack-debug-4.1.6.jar’)

compile files(‘libs/smack-smack-legacy-4.1.6.jar’)

i compiled again but application crashed. i debugged it and found the problem is in this line :

XMPPTCPConnectionConfiguration.Builder config = XMPPTCPConnectionConfiguration.builder();

when i reach this line application crashes.

here is coed snippet of what i did :

AbstractXMPPConnection connection;

XMPPTCPConnectionConfiguration.Builder config = XMPPTCPConnectionConfiguration.builder();
config.setUsernameAndPassword(loginUser, passwordUser);
connection = new XMPPTCPConnection(;
XMPPConnectionListener connectionListener = new XMPPConnectionListener();

any idea why this is happening??

any help would be appreciated

Best regards MA.

Please follow the instructions found at,-report-an-issu e-and-possible-solve-the-problem-yourself when asking for help. Thank you.

i use maven repository instead of using jar files and solved that problem.

compile "org.igniterealtime.smack:smack-android-extensions:4.1.6"
compile “org.igniterealtime.smack:smack-tcp:4.1.6”

now i faced with another problem , i added a RosterListener() to get my foster list and can monitor changing in presence . as it was mentioned in documentation i added it before **login **, but after updating to 4.1.6 (from 4.1.0) **RosterListener() ** not working . is something changed ??