When I check the external libraries in my Android Studio Project, I see duplicated libraries in different versions.
Is there any way to find out the reason.
I definitely do not add more than one dependency. But not sure, what causes this. This is my build.gradle file;
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:4.2.1'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
classpath 'com.google.gms:google-services:4.3.8'
classpath 'com.google.firebase:firebase-crashlytics-gradle:2.6.1'
}
}
allprojects {
repositories {
google()
jcenter()
maven { url "https://jitpack.io" }
mavenCentral()
maven() {
url "https://oss.sonatype.org/content/repositories/snapshots"
}
maven {
url "s3://android.maven.s3.amazonaws.com"
credentials(AwsCredentials) {
accessKey ""
secretKey ""
}
}
}
}
subprojects {
project.evaluationDependsOn(':_ABT')
//[PART TO ADD START]
project.configurations.all {
resolutionStrategy.eachDependency { details ->
if (details.requested.group == 'com.android.support'
&& !details.requested.name.contains('multidex') ) {
details.useVersion "27.1.0"
}
}
}
//[PART TO ADD END]
}
ext {
supportLibVersion = "28.0.0"
}
task clean(type: Delete) {
delete rootProject.buildDir
}
And this is the dependencies build.gradle file;
apply plugin: 'com.android.library'
android {
compileSdkVersion 30
defaultConfig {
minSdkVersion 18
targetSdkVersion 30
versionCode 1
versionName "1.0"
vectorDrawables.useSupportLibrary = true
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
buildToolsVersion '30.0.3'
android {
lintOptions {
checkReleaseBuilds false
abortOnError false
}
}
useLibrary 'android.test.runner'
useLibrary 'android.test.base'
useLibrary 'android.test.mock'
compileOptions {
sourceCompatibility = 1.8
targetCompatibility = 1.8
}
}
dependencies {
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test.ext:junit:1.1.2'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
api 'androidx.lifecycle:lifecycle-extensions:2.2.0'
androidTestImplementation 'androidx.test:rules:1.4.0-beta01'
implementation 'androidx.annotation:annotation:1.2.0'
implementation 'androidx.multidex:multidex:2.0.1'
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'com.loopj.android:android-async-http:1.4.9'
implementation 'com.google.code.gson:gson:2.8.6'
implementation 'com.google.zxing:core:3.3.2'
implementation('com.journeyapps:zxing-android-embedded:3.6.0') { transitive = false }
implementation 'androidx.cardview:cardview:1.0.0'
implementation 'com.google.android.material:material:1.3.0'
implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'com.google.android.gms:play-services-plus:17.0.0'
implementation 'com.google.firebase:firebase-core:19.0.0'
implementation 'com.google.firebase:firebase-messaging:22.0.0'
implementation 'com.firebase:firebase-jobdispatcher:0.8.5'
implementation 'com.stepstone.stepper:material-stepper:4.3.1'
implementation 'com.github.santalu:mask-edittext:1.0.5'
implementation 'com.google.android.gms:play-services-base:17.6.0'
implementation 'com.google.android.gms:play-services-identity:17.0.0'
implementation 'com.google.android.gms:play-services-auth:19.0.0'
implementation 'com.google.android.gms:play-services-auth-api-phone:17.5.0'
implementation('com.github.ozodrukh:CircularReveal:2.0.1@aar') {
transitive = true;
}
implementation 'joda-time:joda-time:2.10'
implementation 'com.google.android.gms:play-services-maps:17.0.1'
implementation 'com.google.firebase:firebase-database:20.0.0'
implementation 'com.google.android.gms:play-services-location:18.0.0'
//Bibliotecas necessárias para rodar secure mobile token
implementation 'com.madgag.spongycastle:bctls-jdk15on:1.58.0.0'
implementation 'com.yakivmospan:scytale:1.0.1'
implementation 'com.github.instacart.truetime-android:library:3.3'
implementation group: 'br.com.martonis.library', name: 'PhoneNumberFormatter', version:'1.4', ext: 'aar', classifier: 'release'
implementation group: 'br.com.martonis.library', name: 'KeyboardStateWatcher', version: '1.2', ext: 'aar', classifier: 'release'
implementation group: 'br.com.martonis.library', name: 'SecureMobileToken', version: '3.125', ext: 'aar', classifier: 'release'
implementation group: 'br.com.martonis.library', name: 'CreditCardCustomView', version: '2.10', ext: 'aar', classifier: 'release'
implementation group: 'br.com.martonis.library', name: 'Updater', version: '2.2', ext: 'aar', classifier: 'release'
implementation 'com.shawnlin:number-picker:2.4.11'
implementation 'androidx.core:core:1.5.0'
implementation 'androidx.legacy:legacy-support-core-ui:1.0.0'
implementation 'me.toptas.fancyshowcase:fancyshowcaseview:1.1.5'
implementation "org.jetbrains.kotlin:kotlin-stdlib:1.4.31"
implementation 'androidx.recyclerview:recyclerview:1.2.0'
implementation 'com.google.android.gms:play-services-vision:20.1.3'
implementation 'org.greenrobot:eventbus:3.1.1'
implementation 'io.reactivex.rxjava2:rxandroid:2.1.1'
implementation 'io.reactivex.rxjava2:rxjava:2.2.14'
implementation 'com.google.android.gms:play-services-maps:17.0.1'
implementation 'com.ethanhua:skeleton:1.1.2'
implementation 'io.supercharge:shimmerlayout:2.1.0'
implementation 'org.apache.commons:commons-lang3:3.4'
implementation 'com.github.bumptech.glide:glide:4.11.0'
annotationProcessor 'com.github.bumptech.glide:compiler:4.11.0'
implementation 'com.squareup.retrofit2:retrofit:2.5.0'
implementation 'com.squareup.retrofit2:converter-gson:2.3.0'
}
apply plugin: 'com.google.gms.google-services'
These are some of the duplicated libraries. For ex, I have 3 libraries for android-core:
androidx.core:core:1.3.1@aar
androidx.core:core:1.3.2@aar
androidx.core:core:1.5.0@aar
And you can see more below:
Is there any way to find out who calls these libraries to find out the sources of them?
Thanks in advance!