Kotlin Error : Could not find org.jetbrains.kotlin:kotlin-stdlib-jre7:1.0.7

后端 未结 15 1140
闹比i
闹比i 2020-11-30 06:17

I installed the Kotlin plugin into my app (v. v1.1.1-release-Studio2.2-1) and then selected "Configure Kotlin in Project" I selected compiler and runtime version

15条回答
  •  长情又很酷
    2020-11-30 06:55

    A new solution if you use Android Studio 3.2, I solved this issue by added mavenCentral() to build.gradle of the project:

    buildscript {
        ext.kotlin_version = '1.3.0'
        repositories {
            mavenCentral()
            google()
            jcenter()
        }
        dependencies {
            classpath 'com.android.tools.build:gradle:3.2.1'
            classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
    
        }
    }
    
    allprojects {
        repositories {
            mavenCentral()
            google()
            jcenter()
        }
    }
    

    You should add the line as this order, the credited is for this answer

提交回复
热议问题