10

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()
    }
}

2
  • I had jcentral instead of mavenCentral in some old code. It helped me to use mavenCentral.
    – dfrankow
    Sep 5, 2023 at 14:16
  • I meant jCenter.
    – dfrankow
    Sep 5, 2023 at 15:08

1 Answer 1

8

I think there is no need to use that as you can use kotlin-stdlib directly.

Try this:

In your app level build.gradle file, under dependencies section:

dependencies{
    implementation "org.jetbrains.kotlin:kotlin-stdlib:1.3.41"
}
5
  • Thank, but when I used this suggestion added in app/build.gradle suddenly occurred for project. I am not sure where is these settings. Jul 14, 2019 at 9:09
  • I couldn't understand you! Jul 14, 2019 at 9:10
  • I don't understand where I should set this setting, becouse i have 4 files "gradle.build" Jul 14, 2019 at 9:12
  • I changed this settings in main directory into build.gradle, but suddenly I have problem "ERROR: Could not find org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.2.71." after "sync project with gradle files". Will you try setup this project? Jul 14, 2019 at 9:25
  • @MartinInf1n1ty This is supposed to be added in the actual app directory's build.gradle file. Not in the root project's gradle file. Nov 21, 2022 at 5:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.