Home > Software engineering >  Where do I add repositories in my root-level build.gradle file?
Where do I add repositories in my root-level build.gradle file?

Time:02-13

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

CodePudding user response:

I think you should use buildscript instead of allprojects. Found question in stackoverflow which explain difference between buildscript and allprojects What's the difference between buildscript and allprojects in build.gradle? So I would suggest to try:

buildscript {
    repositories {
        ...
    }
}

Hopefully this will help :)

  • Related