how to add 'https://jitpack.io library to android studio version bumble bee?

6.7k views Asked by At

In last versions of android studio we can simply add the library https://jitpack.io to the gradle file (module project) easily but in the newest update (android-studio-bumble-bee), the structure of this file has been changed and I don't know how to add this library.

4

There are 4 answers

0
Olivér Raisz On

You can add it in your settings.gradle the following way:

dependencyResolutionManagement {
    repositoriesMode.set(RepositoriesMode.PREFER_SETTINGS)
    repositories {
        google()
        mavenCentral()
        maven { url 'https://jitpack.io' } // add it like this
    }
}
4
YotiS On

you can added in the project settings look for settings gradle hope it helpslook the screenshot

1
Tonnie On

For Kotlin DSL inside settings.gradle.kts file you can use setUrl() just like this.

dependencyResolutionManagement {
    repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
    repositories {
        google()
        mavenCentral()
        maven {
           setUrl("https://jitpack.io")
        }
    }
}
0
mike.pngs On

On Module level build.gradle (not app level)

repositories{
    maven { url = "https://jitpack.io"}
}
...
dependencies {
    ...
    
}