添加链接
link管理
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接

Hello everyone,

I’m trying to build a fairly large Kotlin/Java project with Gradle. Locally, everything is fine, but the build server often has connectivity issues with JCenter:

A problem occurred configuring project ':buildSrc'.
> Could not resolve all files for configuration ':buildSrc:classpath'.
   > Could not resolve org.jetbrains.kotlin:kotlin-gradle-plugin:1.8.21.
     Required by:
         project :buildSrc > org.jetbrains.kotlin.jvm:org.jetbrains.kotlin.jvm.gradle.plugin:1.8.21
      > Could not resolve org.jetbrains.kotlin:kotlin-gradle-plugin:1.8.21.
         > Could not parse POM https://plugins.gradle.org/m2/org/jetbrains/kotlin/kotlin-gradle-plugin/1.8.21/kotlin-gradle-plugin-1.8.21.pom
            > Could not resolve org.jetbrains.kotlin:kotlin-gradle-plugins-bom:1.8.21.
               > Could not resolve org.jetbrains.kotlin:kotlin-gradle-plugins-bom:1.8.21.
                  > Could not get resource 'https://plugins.gradle.org/m2/org/jetbrains/kotlin/kotlin-gradle-plugins-bom/1.8.21/kotlin-gradle-plugins-bom-1.8.21.pom'.
                     > Could not HEAD 'https://jcenter.bintray.com/org/jetbrains/kotlin/kotlin-gradle-plugins-bom/1.8.21/kotlin-gradle-plugins-bom-1.8.21.pom'. Received status code 403 from server: Forbidden

Does anybody have a hint for me how I can configure the gradle buildscript (Kotlinscript) to use a different plugin repository that does not rely on JCenter?

Thanks!

jcenter is retired and the SSL certificates are not working, if you really want jcenter binary then you download it offline and add it your gradle or maven using a dummy project

1.) Or you can use and older version Android studio, create a dummy project and download the binaries

2.) Or you can create a proxy application and make SSL request go through a non SSL local address

3.) Or you can use JFrog like artifactory and put the binaries there

4.) And final valid answer remove jcenter in your gradle, upgrade your code to latest version java and libraries

I did the 4th answer, that is only correct way, I did it in real time for a particular airlines corporate.