Can't use kotlin-multipatform project

馋奶兔 提交于 2020-01-05 04:18:15

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!