android studio : Could not find org.jetbrains.kotlin:kotlin-stdlib-jre7:1.5.31

Posted Mars-xq

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了android studio : Could not find org.jetbrains.kotlin:kotlin-stdlib-jre7:1.5.31相关的知识,希望对你有一定的参考价值。

插件版本配置:

仓库配置:

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-jre7/

发现版本最高为:1.2.71 ,无法下载1.5.31版本

https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib-jdk7/

发现版本存在为:1.5.31,所以:

# implementation"org.jetbrains.kotlin:kotlin-stdlib-jre7:$kotlin_version"
# 将jre7改为jdk7
implementation"org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"

重新编译OK

以上是关于android studio : Could not find org.jetbrains.kotlin:kotlin-stdlib-jre7:1.5.31的主要内容,如果未能解决你的问题,请参考以下文章

Android studio初次运行出现Installation did not succeed. The application could not be installed

android studio——Could not find method externalNativeBuild()

错误记录Android Studio 编译报错 ( Could not determine java version from ‘11.0.8‘. | Android Studio 降级 )(代码片段

错误记录Android Studio 编译报错 ( Could not determine java version from ‘11.0.8‘. | Android Studio 降级 )(代码片段

想离线使用 Android studio,但出现Could not download

Android Studio Could not GET gradle-3.2.0.pom (安卓包配置相关问题)