0
votes

I am trying to migrate to smack 4.1. I followed the instructions provided at https://github.com/igniterealtime/Smack/wiki/Smack-4.1-Readme-and-Upgrade-Guide to add smack android to my project.

Adding Maven urlAdding dependencies

I get the following error when gradle syncs

Gradle Sync error

2

2 Answers

0
votes

4.1.1 is the latest version.
This is what I am using in dependencies section of my current project -

compile 'org.igniterealtime.smack:smack-android:4.1.1'
// Optional for XMPPTCPConnection
compile 'org.igniterealtime.smack:smack-tcp:4.1.0'
// Optional for XMPP-IM (RFC 6121) support (Roster, Threaded Chats)
compile 'org.igniterealtime.smack:smack-im:4.1.0'
// Optional for XMPP extensions support
compile 'org.igniterealtime.smack:smack-extensions:4.1.0'

This should solve your issue.

0
votes

The error reported by Android Studio is that, it isn't able to find the smack-android-extensions and smack-tcp packages.

The reason was because, grade was configured in Offline Mode. It means that it won't go to the network to resolve dependencies.

Go to Preferences > Gradle and uncheck "Offline work" to disable offline mode. This solves the problem