【问题标题】:https://dl.bintray.com/kotlin/kotlin-eap 502 bad gatewayhttps://dl.bintray.com/kotlin/kotlin-eap 502 网关错误
【发布时间】:2022-01-17 04:08:27
【问题描述】:

我的 apk 编译失败,说它无法获取

Plugin [id: 'org.jetbrains.kotlin.jvm', version: '1.4.21'] was not found in any of the following sources:

当我尝试访问:https://dl.bintray.com/kotlin/kotlin-eap 我得到一个 502 bad gateway

这就是它无法构建的原因吗?

我的毕业生:

// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
    ext.kotlin_version = '1.3.50'
    repositories {
        jcenter()
        google()
        gradlePluginPortal()

    }
    dependencies {
        classpath 'com.android.tools.build:gradle:4.0.1'
        classpath 'com.google.gms:google-services:4.3.4'
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
        classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.0'
        classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1'
        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}
plugins {
    id 'org.jetbrains.kotlin.jvm' version '1.4.21'
}

allprojects {
            repositories {
                maven { url "https://maven.google.com" }
                maven { url "https://jitpack.io" }
                maven { url "http://dl.bintray.com/jlmd/maven" }
                maven{
                    url "https://oss.sonatype.org/content/repositories/snapshots"

                }
                maven {
                    url "https://cardinalcommerceprod.jfrog.io/artifactory/android"
            credentials {
                username 'braintree_team_sdk'
                password 'AKCp8jQcoDy2hxSWhDAUQKXLDPDx6NYRkqrgFLRc3qDrayg6rrCbJpsKKyMwaykVL8FWusJpp'
            }
        }
        maven{
            url 'https://zendesk.jfrog.io/zendesk/oss-releases-local'

        }
        jcenter()
        google()

        mavenCentral()

    }
}

repositories {
    maven { url 'https://dl.bintray.com/kotlin/kotlin-eap' }
    mavenCentral()
}
dependencies {
    implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8"
}
compileKotlin {
    kotlinOptions {
        jvmTarget = "1.8"
    }
}
compileTestKotlin {
    kotlinOptions {
        jvmTarget = "1.8"
    }
}

我找不到我的 apk 上个月突然停止构建它的原因,我需要在明天之前找到解决方案,请有人帮助我。

完整的错误代码

Plugin [id: 'org.jetbrains.kotlin.jvm', version: '1.4.21'] was not found in any of the following sources:

- Gradle Core Plugins (plugin is not in 'org.gradle' namespace)
- Plugin Repositories (could not resolve plugin artifact 'org.jetbrains.kotlin.jvm:org.jetbrains.kotlin.jvm.gradle.plugin:1.4.21')
  Searched in the following repositories:
    maven(https://dl.bintray.com/kotlin/kotlin-eap)
    MavenRepo
    maven2(https://plugins.gradle.org/m2/)

【问题讨论】:

  • 正如@JunYao 提到的,JCenter 似乎已停产,AndroidStudio 告诉我:“JCenter Maven 存储库不再接收更新:更新的库版本可能在其他地方可用”

标签: android kotlin bintray


【解决方案1】:

尚不支持BintrayJCenter

删除gradle 文件中的所有BintrayJCenter 存储库配置。并改用mavenCentral()

解决办法如下:

// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
    ext.kotlin_version = '1.3.50'
    repositories {
        // jcenter()
        mavenCentral() // use this instead
        google()
        gradlePluginPortal()

    }
    dependencies {
        classpath 'com.android.tools.build:gradle:4.0.1'
        classpath 'com.google.gms:google-services:4.3.4'
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
        classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.0'
        classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1'
        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}
plugins {
    id 'org.jetbrains.kotlin.jvm' version '1.4.21'
}

allprojects {
            repositories {
                maven { url "https://maven.google.com" }
                maven { url "https://jitpack.io" }
                // maven { url "http://dl.bintray.com/jlmd/maven" }
                maven{
                    url "https://oss.sonatype.org/content/repositories/snapshots"

                }
                maven {
                    // url "https://cardinalcommerceprod.jfrog.io/artifactory/android"
            credentials {
                username 'braintree_team_sdk'
                password 'AKCp8jQcoDy2hxSWhDAUQKXLDPDx6NYRkqrgFLRc3qDrayg6rrCbJpsKKyMwaykVL8FWusJpp'
            }
        }
        maven{
            // url 'https://zendesk.jfrog.io/zendesk/oss-releases-local'

        }
        // jcenter()
        google()

        mavenCentral()

    }
}

repositories {
    maven { url 'https://dl.bintray.com/kotlin/kotlin-eap' }
    mavenCentral()
}
dependencies {
    implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8"
}
compileKotlin {
    kotlinOptions {
        jvmTarget = "1.8"
    }
}
compileTestKotlin {
    kotlinOptions {
        jvmTarget = "1.8"
    }
}

【讨论】:

  • 非常感谢,但我仍然收到相同的错误 ` Plugin [id: 'org.jetbrains.kotlin.jvm', version: '1.4.21'] was not found in any of the以下来源: - Gradle 核心插件(插件不在 'org.gradle' 命名空间中) - 插件存储库(无法解析插件工件 'org.jetbrains.kotlin.jvm:org.jetbrains.kotlin.jvm.gradle.plugin:1.4 .21') 在以下存储库中搜索:maven(dl.bintray.com/kotlin/kotlin-eap) MavenRepo maven2(plugins.gradle.org/m2)`
猜你喜欢
  • 1970-01-01
  • 2017-03-28
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2022-01-07
  • 2021-07-21
  • 2011-05-14
  • 2016-07-04
相关资源
最近更新 更多