Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build was configured to prefer settings repositories over project repositories but repository 'BintrayJCenter' was added by build file 'build.gradle' #125

Open
anuragvish opened this issue Dec 12, 2021 · 1 comment

Comments

@anuragvish
Copy link

// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
google()
mavenCentral()

}
dependencies {
    classpath "com.android.tools.build:gradle:7.0.4"
    classpath 'com.google.gms:google-services:4.3.10'

    // NOTE: Do not place your application dependencies here; they belong
    // in the individual module build.gradle files
}

}

allprojects {
repositories {
jcenter()
maven { url "https://jitpack.io" }
}
}

task clean(type: Delete) {
delete rootProject.buildDir
}

@H4zh4n
Copy link

H4zh4n commented Dec 17, 2021

@anuragvish
Add the maven { url "https://jitpack.io" } to settings.gradle file instead of build.gradle.

should look something like below :

dependencyResolutionManagement {
    repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
    repositories {
        google()
        mavenCentral()
        jcenter()
        maven { url "https://jitpack.io" }  // <----
    }
}

In-case of further issues, it is advisable that in settings.gradle file, you replace
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
with
repositoriesMode.set(RepositoriesMode.PREFER_SETTINGS)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants