Reputation: 4408
I am using a library
implementation ('com.simplemobiletools:commons:5.32.23')
It was working with jcenter
. But now it is not even working with jcenter()
. I am getting this error:
Could not find commons-5.32.23.aar (com.simplemobiletools:commons:5.32.23).
Searched in the following locations:
https://jcenter.bintray.com/com/simplemobiletools/commons/5.32.23/commons-5.32.23.aar
https://jcenter.bintray.com/com/simplemobiletools/commons/5.32.23/commons-5.32.23.jar
As recommended by Android and importing its alternate Maven version. I am able to find the library in Maven here:
https://mvnrepository.com/artifact/com.simplemobiletools/commons
But when I import it in Android, it fails to load and says "Failed to resolve com.simplemobiletools:commons:1.0.12
"
Why is that? I need to remove jcenter and use its alternate Maven version.
I have added this in my settings.gradle
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
google()
mavenCentral()
maven { url 'https://jitpack.io' }
jcenter()
}
}
I have this in my projectName/build.gradle
:
buildscript {
dependencies {
classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1'
}
}
....
And I have added this in app/build.gradle
:
buildscript {
repositories {
google()
mavenCentral()
// maven { url 'https://maven.fabric.io/public' }
// maven { url "https://jitpack.io" }
}
dependencies {
classpath 'com.android.tools.build:gradle:8.7.0'
}
}
Plus, first I was getting error "Failed to resolve: com.simplemobiletools:filepicker:1.6.1"
Then I excluded filepicker
like:
implementation ('com.simplemobiletools:commons:1.0.12') {
exclude module:'filepicker'
exclude module: 'joda-time'
}
then I started to get Failed to resolve com.simplemobiletools:commons:1.0.12
Upvotes: 0
Views: 83