Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

I tried to use gradle for transpiling Kotlin to Js. When I run the example from https://www.codeflow.site/fr/article/kotlin-javascript I got the error : Could not initialize class org.jetbrains.kotlin.gradle.internal.KotlinSourceSetProviderImplKt which comes from line apply plugin: 'kotlin2js' of build.gradle.

I have no idea of what the missing class is and why kotlin2js is asking for it. Any suggestion ?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
581 views
Welcome To Ask or Share your Answers For Others

1 Answer

Solved this issue by setting the latest Kotlin version (1.3.72) in build.gradle file.

buildscript {
ext {
    kotlinVersion = '1.4.20'
    springBootVersion = '2.0.4.RELEASE'
}
repositories {
    mavenCentral()
}
... 
}

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...