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);
config.setSecurityMode(ConnectionConfiguration.SecurityMode.disabled);
config.setServiceName(serverName);
config.setHost(serverAddress);
config.setPort(5222);
config.setDebuggerEnabled(true);
connection = new XMPPTCPConnection(config.build());
XMPPConnectionListener connectionListener = new XMPPConnectionListener();
connection.addConnectionListener(connectionListener);

any idea why this is happening??

any help would be appreciated

Best regards MA.

Please follow the instructions found at https://github.com/igniterealtime/Smack/wiki/How-to-ask-for-help,-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 ??