解决Could not find org.jetbrains.kotlin:kotlin-stdlib-jre7:1.3.20问题
生活随笔
收集整理的這篇文章主要介紹了
解决Could not find org.jetbrains.kotlin:kotlin-stdlib-jre7:1.3.20问题
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
下載了別人的一個項目,項目編譯完成沒有出錯,運行時出現如下錯誤
Execution failed for task ':app:checkDebugAarMetadata'. > Could not resolve all files for configuration ':app:debugRuntimeClasspath'.> Could not find org.jetbrains.kotlin:kotlin-stdlib-jre7:1.3.20.Searched in the following locations:- https://dl.google.com/dl/android/maven2/org/jetbrains/kotlin/kotlin-stdlib-jre7/1.3.20/kotlin-stdlib-jre7-1.3.20.pom- https://jcenter.bintray.com/org/jetbrains/kotlin/kotlin-stdlib-jre7/1.3.20/kotlin-stdlib-jre7-1.3.20.pom- https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib-jre7/1.3.20/kotlin-stdlib-jre7-1.3.20.pomRequired by:project :appPossible solution:- Declare repository providing the artifact, see the documentation at https://docs.gradle.org/current/userguide/declaring_repositories.html?百度看了下基本都是說導入三個依賴:‘google()’、‘jcenter()’、‘maven()’。但是試了一下沒什么用,最后給出解決方案:
在引用kotlin-stdlib-jre7的module的gradle.build文件中修改:
?implementation "org.jetbrains.kotlin:kotlin-stdlib-jre7:1.3.20"
?改成
?implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.3.20"
引用的末端低版本的是jre7,高版本的是jdk7
總結
以上是生活随笔為你收集整理的解决Could not find org.jetbrains.kotlin:kotlin-stdlib-jre7:1.3.20问题的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 【中间件安全】IIS6安全加固规范
- 下一篇: 计算机网络-3-局域网数据链路层原理与技