无法解析org.jetbrains.kotlinx:kotlinx-gradle-serialization-plugi



我对android项目有一些问题,当我尝试与Gradle文件同步项目时,控制台日志显示此错误


* What went wrong:
A problem occurred configuring root project 'GlobalApp'.
> Could not resolve all artifacts for configuration ':classpath.
> Could not resolve org.jetbrains.kotlinx:kotlinx-gradle-serialization-plugin:0.5.1.
Required by:
project :
> Could not resolve org.jetbrains.kotlinx:kotlinx-gradle-serialization-plugin:0.5.1.
> Could not get resource 'https://kotlin.bintray.com/kotlinx/org/jetbrains/kotlinx/kotlinx-gradle-serialization-plugin/0.5.1/kotlinx-gradle-serialization-plugin-0.5.1.pom'.
> Could not GET 'https://kotlin.bintray.com/kotlinx/org/jetbrains/kotlinx/kotlinx-gradle-serialization-plugin/0.5.1/kotlinx-gradle-serialization-plugin-0.5.1.pom'. Received status code 403 from server: Forbidden

加载URL https://kotlin.bintray.com/kotlinx/org/jetbrains/kotlinx/kotlinx-gradle-serialization-plugin/0.5.1/kotlinx-gradle-serialization-plugin-0.5.1.pom时响应是403

我不知道是否存在另一个存储库或如何解决这个问题?

他们是我的建筑。gradle文件


buildscript {
ext.kotlin_version = '1.2.51'
ext.serialization_version = '0.5.1'
repositories {
google()
mavenCentral()
maven { url "https://kotlin.bintray.com/kotlinx" }
}
dependencies {
classpath 'com.android.tools.build:gradle:3.2.1'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath "org.jetbrains.kotlinx:kotlinx-gradle-serialization-plugin:$serialization_version"
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
google()
mavenCentral()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'kotlinx-serialization'
android {
compileSdkVersion 28
buildToolsVersion '28.0.3'
defaultConfig {
applicationId "com.sisvol.app.globalappkcr"
minSdkVersion 21
targetSdkVersion 28
versionCode 1
versionName '2.39.0'
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
setProperty("archivesBaseName", "GlobalApp-JSM-ST8050B-$versionName")
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
compileKotlin {
kotlinOptions.jvmTarget = "1.8"
}
compileTestKotlin {
kotlinOptions.jvmTarget = "1.8"
}
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
implementation "org.jetbrains.kotlinx:kotlinx-serialization-runtime:$serialization_version"
//implementation 'com.google.code.gson:gson:2.8.5'
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support:exifinterface:28.0.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
implementation 'com.android.support:design:28.0.0'
implementation 'com.android.volley:volley:1.1.1'
implementation 'com.android.support:recyclerview-v7:28.0.0'
implementation 'com.squareup.picasso:picasso:2.71828'
implementation files('libs/core-3.2.1.jar')
implementation files('libs/top-usdk-service-1.0.2.jar')
}
``

buildscript {
ext.kotlin_version = '1.2.51'
ext.serialization_version = '0.5.1'
repositories {
google()
mavenCentral()
maven { url "https://dl.bintray.com/kotlin/kotlinx/" }
}

修改maven的url: https://dl.bintray.com/kotlin/kotlinx/

最新更新