How to resolve error “Failed to resolve: org.jetbrains.kotlin:kotlin-stdlib-jre7…” when building in Android Studio

前端 未结 4 1585
感动是毒
感动是毒 2020-12-13 01:13

I\'ve created a new project by checking the \"include kotlin\" box in Android Studio 3 and out of the box I get an error while compiling

\"Failed to resolve:         


        
4条回答
  •  自闭症患者
    2020-12-13 01:54

    In build.gradle (Module:app) replace

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

    with

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

    and in build.gradle (Module:project) change version to

    ext.kotlin_version = '1.3.0'
    

提交回复
热议问题