10

I am new to android development. I am trying to start a "hello world" project for an android app following the google android fundamentals course.

I believe i have the android plugin correctly installed. I keep getting the

error: Failed to resolve: org.jetbrains.kotlin:kotlin-stdlib-jre7:1.3.21

The code in my hello world app is:

buildscript {
ext.kotlin_version = '1.3.21'
repositories {
    google()
    jcenter()
    }
    dependencies {
    classpath 'com.android.tools.build:gradle:3.1.0'
    //classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.21"
    classpath "org.jetbrains.kotlin:kotlin-stdlib:1.3.21"
    //classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"

    // NOTE: Do not place your application dependencies here; they belong
    // in the individual module build.gradle files
    }
}

allprojects {
    repositories {
    google()
    jcenter()
    }
}

task clean(type: Delete) {
delete rootProject.buildDir
2

2 Answers 2

15

You need to replace jre by jdk as suggested by EpicPandaForce:

implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
0

Replace jre by jdk.

Previous:

implementation"org.jetbrains.kotlin:kotlin-stdlib-jre7:$kotlin_version"

After Replace:

implementation"org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"

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