Smack 4.3.4 causing gradle project sync to fail in Android Studio

The error is caused by applying the google services plugin for using something like Firebase. I will upload an empty project with the google services plugin set up and smack 4.3.4 imports that’s throwing the error in a moment.

https://drive.google.com/open?id=1vdFOMgdtkQ16e6pL6FtuYnunovibGhJn

Then you may want to report this at Issues · google/play-services-plugins · GitHub

BTW the plugin provides pretty decent information how to debug and/or work-around the issue:

For extended debugging info execute Gradle from the command line with ./gradlew --info :app:assembleDebug to see the dep
endency paths to the artifact. This error message came from the google-services Gradle plugin, report issues at https://
GitHub - google/play-services-plugins: Plugins to help with using Google Play services SDK. and disable by adding “googleServices { disableVersionCheck = false }” to your b
uild.gradle file.

What made the error go away in 4.4.0-alpha1?

I did not go away, ihe cause was never there. 4.4.0-alpha1 is older than 4.3.3.

Any news on this?
I’m stuck too with Smack 4.3.2 and can’t upgrade

This is an option, but it is a bit too invasive as disable version checking where it does make sense for an issue people are having with a single library.

Just to add another data set. I have gradle 5.6, gradle plugin 3.5.0, Android Studio 3.5, and I see the same issue with versions of the smack library above 4.3.2, what has changed with 4.3.3 as it seem when it started to break?

Would it be this following change affecting it:
https://issues.igniterealtime.org/browse/SMACK-858

As far as I can tell this is an issue of the play-services-plugin which is unable to parse or understand the valid POM Dependency Version Requirement Specification (e.g., [0.6, 0.6.999] in this case).

Hence there is nothing to do on Smack’s end.

// XMPP
    implementation( 'org.igniterealtime.smack:smack-tcp:4.3.4') {
        exclude group: 'org.jxmpp', module: 'jxmpp-util-cache'
        exclude group: 'org.jxmpp', module: 'jxmpp-jid'
        exclude group: 'org.jxmpp', module: 'jxmpp-core'
        exclude group: 'org.minidns', module: 'minidns-core'
        exclude group: 'org.minidns', module: 'minidns-android21'
        exclude group: 'org.minidns', module: 'minidns-hla'
    }
    implementation('org.igniterealtime.smack:smack-experimental:4.3.4') {
        exclude group: 'org.jxmpp', module: 'jxmpp-util-cache'
        exclude group: 'org.jxmpp', module: 'jxmpp-jid'
        exclude group: 'org.jxmpp', module: 'jxmpp-core'
        exclude group: 'org.minidns', module: 'minidns-core'
        exclude group: 'org.minidns', module: 'minidns-android21'
        exclude group: 'org.minidns', module: 'minidns-hla'
    }
    implementation('org.igniterealtime.smack:smack-android:4.3.4') {
        exclude group: 'org.jxmpp', module: 'jxmpp-util-cache'
        exclude group: 'org.jxmpp', module: 'jxmpp-jid'
        exclude group: 'org.jxmpp', module: 'jxmpp-core'
        exclude group: 'org.minidns', module: 'minidns-core'
        exclude group: 'org.minidns', module: 'minidns-android21'
        exclude group: 'org.minidns', module: 'minidns-hla'
    }

    implementation 'org.jxmpp:jxmpp-util-cache:0.6.4'
    implementation 'org.jxmpp:jxmpp-jid:0.6.4'
    implementation 'org.jxmpp:jxmpp-core:0.6.4'
    implementation 'org.minidns:minidns-core:0.3.4'
    implementation 'org.minidns:minidns-android21:0.3.4'
    implementation 'org.minidns:minidns-hla:0.3.4'

Since I have a blocked bug that was fixed in 4.3.4 I decided to look into this more. This seems to work for me.

1 Like

Just out of curiosity, which bug is that?

Glad that you found something that works for you. :slight_smile:

BTW, I think gradle’s facilities to pin a (transitive) dependency to a particular version may also form a solution, which would be more elegant.

It was a bug on a project I’m working on that you fixed with https://issues.igniterealtime.org/browse/SMACK-869 :slightly_smiling_face:

bump this issue up. Any news on this?

Thank you. Your solution works for me too. I no longer need this line:
googleServices { disableVersionCheck = true }

Thanks, It Worked !! :slight_smile:

1 Like

This topic was automatically closed 62 days after the last reply. New replies are no longer allowed.