【发布时间】:2018-03-27 13:49:57
【问题描述】:
我整天都在尝试修复这个错误。我早上所做的就是更新我在 Android Studio 上的编译器。就在那时,一切都变得非常糟糕。从那以后我卸载了编译器...
这些是我每次尝试同步 gradle 时都会遇到的错误类型:
Gradle sync failed: Could not find org.jetbrains.kotlin:kotlin-stdlib-jre8:1.2.0.
Searched in the following locations:
https://maven.google.com/org/jetbrains/kotlin/kotlin-stdlib-jre8/1.2.0/kotlin-stdlib-jre8-1.2.0.pom
https://maven.google.com/org/jetbrains/kotlin/kotlin-stdlib-jre8/1.2.0/kotlin-stdlib-jre8-1.2.0.jar
是最新的,也是我无法解决的……我尝试过的事情:
- 为了解决其他问题,我物理下载了 jar 文件并 将它们放在各自的位置(在 kotlin 1.2.0 中失败)...
- 我也将此添加到我的 gradle 中:
.
buildscript {
repositories {
jcenter()
google()
maven { url 'https://maven.fabric.io/public' }
maven { url 'https://jitpack.io' }
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.1.0'
classpath 'io.fabric.tools:gradle:1.+'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
这解决了我的其他问题...
- 我尝试从离线模式运行,但失败了...
- 我尝试将文件下载到项目中并像这样引用它:
.
compile files('kotlin-stdlib-jre8-1.2.0.jar')
我早就删除了编译器,只是坚持要做什么......我在网上找不到任何方法来解决我的问题
【问题讨论】:
-
请记住
kotlin-stdlib-jre8和kotlin-stdlib-jdk8是 minSdk 24。
标签: android kotlin android-gradle-plugin synchronization