androidkotlingradledependenciesandroid-studio-bumblebee

Where do I add repositories in my root-level build.gradle file?


Recently, I updated my Android Studio to Bumblebee(stable version) that was released around 2 weeks back. The structure of the build.gradle(root-level) file seems to have changed a lot since the last version.

I am facing issue in adding dependencies in the root-level build.gradle file.

Here is what I want to add.enter image description here

in the build.gradle file

enter image description here


Solution

  • settings.gradle instead of build.gradle:

    dependencyResolutionManagement {
        repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
        repositories {
          // ...
            maven { url 'https://jitpack.io' }
        }
    }
    

    this way you dont need to use the build.gradle instead use the settings.gradle, these way it worked for me in Android Studio Bumblebee