I can't compile the project anymore when I add the following dependencies
dependencies {
...
implementation 'org.eclipse.paho:org.eclipse.paho.client.mqttv3:1.0.2'
implementation 'org.eclipse.paho:org.eclipse.paho.android.service:1.0.2'
...
}
to the project as suggested on the paho eclipse website:
https://www.eclipse.org/paho/clients/android/
I get following errors:
Duplicate class androidx.collection.LruCache found in modules collection-1.0.0.jar (androidx.collection:collection:1.0.0) and jetified-support-v4-r7.jar (com.google.android:support-v4:r7)
Duplicate class androidx.core.accessibilityservice.AccessibilityServiceInfoCompat found in modules core-1.0.1-runtime.jar (androidx.core:core:1.0.1) and jetified-support-v4-r7.jar (com.google.android:support-v4:r7)
Duplicate class androidx.core.app.ActivityCompat found in modules core-1.0.1-runtime.jar (androidx.core:core:1.0.1) and jetified-support-v4-r7.jar (com.google.android:support-v4:r7)
and many more others duplicate class errors. My project setup is quite basic because I just started.
So practically if you open a new project and add those dependencies you should get the same error as I did.
Why is that?How to solve this?
P.S.: I already cleaned, rebuilt, Invalidated caches and restarted, updated Android studio etc..
Nothing, I'm missing something else here.