When running my app Android Studio is running into a build error. The Error is:

Could not GET 'http://jcenter.bintray.com/org/jetbrains/kotlin/kotlin-stdlib-jre8/1.2.0/kotlin-stdlib-jre8-1.2.0.jar'. Received status code 403 from server: Forbidden

I am unsure what the cause of this is and I haven't found a solution researching on Google. It looks like it's a related to a Kotlin jar but my project uses Java only.

My other apps build fine the issue above is occurring for just one project.

If anyone has any insights as to why this is happening I'd greatly appreciate it.

Thanks

2

There are 2 answers

2
Masoud Aghaei On

its probably too late but just replace jcenter() in root build.gradle with:

maven {
    url 'https://jcenter.bintray.com'
    name 'jcenter'
}
0
Oveis On

in the project level build.gradle file add mavenCentral() to the both repositories

buildscript {
    
    ext {
        ...
    }

    repositories {
        google()
        jcenter()
        mavenCentral()
    }

    dependencies {
        ...
    }
}

allprojects {
    repositories {
        google()
        jcenter()
        mavenCentral()
    }
}