问题
I try to create my first Kotlin multiplatform project in Intellij Idea Community 2019.2.3.
Was used default IDE project: enter image description here
But even default project build with exception like this ko
my versions: koltin 1.3.50 gradle: 4.4.1 Groovy: 2.4.16
What's wrong? How can I fix it?
回答1:
You need to update the Gradle version. The kotlin-multiplatform
plugin that is used to build multiplatform projects is only compatible with Gradle versions 4.7 and above, as said in the reference.
Consider using an up-to-date Gradle version (Gradle 5.6.2 at the moment, check for updates here), which will also likely give better performance and other benefits.
To update the version, modify gradle/wrapper/gradle-wrapper.properties
in your project, replacing the distributionUrl
property. For instance, the line could look like:
distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.2-bin.zip
Or, if you are not using a Gradle wrapper, just call gradle
from a newer version distribution.
来源:https://stackoverflow.com/questions/58166247/cant-use-kotlin-multipatform-project