Unable to create xmpptcpconnection using Samck4.1.3 Android studio

Hi,

I have developed xmpp chat application using aSmack library. As per the ignite realtime documentation aSmack is not longer use in future.

Now i am trying to implement Smack 4.1.2 and 4.1.3 library in Android studio. I am getting an error while adding smack library in Android studio in smack-android\build.gradle.

e.i

Error:(12, 0) Could not find property ‘androidProjects’ on org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler_Dec orated@33a91d7a.

Error:(12) A problem occurred evaluating project ‘:smack-android’.

Could not find property ‘androidProjects’ on org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler_Dec orated@dbf41c.

dependencies {

// androidProjects lists all projects that are checked to compile against android.jar
// Filter out the optional Smack dependencies from androidProjects
androidProjects.findAll {

![‘:smack-tcp’, ‘:smack-extensions’, ‘:smack-experimental’, ‘:smack-bosh’].contains(it.getPath())

}.each { project →

compile project

}

}

compileJava {

options.bootClasspath = androidBootClasspath

}

Please help me guys for this.

It appears you are trying to add Smack as gradle subproject to your Android project. Don’t do that unless you know what you are doing and have a good reason to do so. Please consult the Smack 4.1 Readme and Upgrade Guide on how to add Smack to your project.

Hi,

I’m also facing the same issue. The thing is that I’m trying to use XEP-313 implementation from Smack’s fork(https://github.com/esl/Smack) which has not been merged into official repository as yet. Here is the discussion regarding the same issue - Implementation of XEP-0313: Message Archive Management (MAM) by ramabit · Pull Request #76 · igniterealtime/Smack · GitH…

So instead of waiting for new version of Smack, I wanted to test it out from source code. How do I solve this error?