META-INF/DEPENDENCIES error when include java-full

Hi All,

New to this support community so please be gentle if I do something wrong.

I am using smack 4.4.8 and tried to include smack-java8-full in Gradle Android Studio. When I compile the code it gives me the error below:

2 files found with path ‘META-INF/DEPENDENCIES’ from inputs:

I tried java11-full and version 4.5.0-beta5 and still have the same issue. Is that some of my configuration in the project withing Andriod Studio is incorrect? Thank you in advance

the Smack has a dependency to the httpclient and some another your library also has the transitive dependency to the httpclient but with slightly different version. The warning or error says about this.
See
https://docs.gradle.org/current/userguide/how_to_exclude_transitive_dependencies.html

Thank you for your information.

I created a new project with empty view activity it still showing the same. I also tried to comment out the default dependencies one by one and none of these stop the error message.

However, the link you provided provide useful information. At the end I have to add the lines below:

configurations {

  • all*.exclude group: “org.apache.httpcomponents”, module: “httpclient”*
  • all*.exclude group: “org.apache.httpcomponents”, module: “httpcore”*

}

Here is the default dependencies:

  • implementation libs.appcompat
  • implementation libs.material
  • implementation libs.activity
  • implementation libs.constraintlayout
  • testImplementation libs.junit
  • androidTestImplementation libs.ext.junit
  • androidTestImplementation libs.espresso.core

Not sure if the cause of the error message is somewhere else in build.gradle file

Thank you for your help once again

1 Like

You can’t use smack-java8-full for Android builds, use smack-android instead.

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