插件版本配置:
仓库配置:
ext.kotlin_version = '1.5.31'
repositories {
maven{ url 'https://maven.aliyun.com/repository/google'}
maven{ url 'https://maven.aliyun.com/repository/gradle-plugin'}
maven{ url 'https://maven.aliyun.com/repository/public'}
maven{ url 'https://maven.aliyun.com/repository/jcenter'}
google()
mavenCentral()
jcenter()
}
依然报错:
Could not find org.jetbrains.kotlin:kotlin-stdlib-jre7:1.5.31. Searched in the following locations:
- https://maven.aliyun.com/repository/google/org/jetbrains/kotlin/kotlin-stdlib-jre7/1.5.31/kotlin-stdlib-jre7-1.5.31.pom
- https://maven.aliyun.com/repository/gradle-plugin/org/jetbrains/kotlin/kotlin-stdlib-jre7/1.5.31/kotlin-stdlib-jre7-1.5.31.pom
- https://maven.aliyun.com/repository/public/org/jetbrains/kotlin/kotlin-stdlib-jre7/1.5.31/kotlin-stdlib-jre7-1.5.31.pom
- https://maven.aliyun.com/repository/jcenter/org/jetbrains/kotlin/kotlin-stdlib-jre7/1.5.31/kotlin-stdlib-jre7-1.5.31.pom
- https://dl.google.com/dl/android/maven2/org/jetbrains/kotlin/kotlin-stdlib-jre7/1.5.31/kotlin-stdlib-jre7-1.5.31.pom
- https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib-jre7/1.5.31/kotlin-stdlib-jre7-1.5.31.pom
- https://jcenter.bintray.com/org/jetbrains/kotlin/kotlin-stdlib-jre7/1.5.31/kotlin-stdlib-jre7-1.5.31.pom
阿里云仓库:
https://developer.aliyun.com/mvn/search:
- 搜索
kotlin-stdlib-jre7 发现版本最高为:1.2.71 ,无法下载1.5.31版本
mavenCentral仓库:
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib-jre 7/
发现版本最高为:1.2.71 ,无法下载1.5.31版本
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib-jdk 7/
发现版本存在为:1.5.31 ,所以:
# implementation"org.jetbrains.kotlin:kotlin-stdlib-jre7:$kotlin_version"
# 将jre7改为jdk7
implementation"org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
重新编译OK
|