首页 > 解决方案 > ERROR: Could not find org.jetbrains.kotlin:kotlin-stdlib-jdk8

问题描述

I have problem with build project in android-studio from https://github.com/Samsung/microbit.

I imported repository by git, but while build gradle project from in android-studio I have error:

ERROR: Could not find org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.2.71.

I am not sure how I can change version 1.2.72 to other version.

Edit:

Solution:

I added mavenCentral() to

// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
    repositories {
        google()
        mavenCentral()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.2.1'
        classpath 'com.google.gms:google-services:3.0.0'
    }
}

allprojects {
    repositories {
        google()
    }
}

标签: javaandroidgradlekotlinbuild

解决方案


我认为没有必要使用它,因为您可以直接使用 kotlin-stdlib。

尝试这个:

在您的应用程序级别build.gradle文件中,在依赖项部分下:

dependencies{
    implementation "org.jetbrains.kotlin:kotlin-stdlib:1.3.41"
}

推荐阅读