https://kotlinlang.org logo
Join the conversationJoin Slack
Channels
100daysofcode
100daysofkotlin
100daysofkotlin-2021
advent-of-code
aem
ai
alexa
algeria
algolialibraries
amsterdam
android
android-architecture
android-databinding
android-studio
androidgithubprojects
androidthings
androidx
androidx-xprocessing
anime
anko
announcements
apollo-kotlin
appintro
arabic
argentina
arkenv
arksemdevteam
armenia
arrow
arrow-contributors
arrow-meta
ass
atlanta
atm17
atrium
austin
australia
austria
awesome-kotlin
ballast
bangladesh
barcelona
bayarea
bazel
beepiz-libraries
belgium
berlin
big-data
books
boston
brazil
brikk
budapest
build
build-tools
bulgaria
bydgoszcz
cambodia
canada
carrat
carrat-dev
carrat-feed
chicago
chile
china
chucker
cincinnati-user-group
cli
clikt
cloudfoundry
cn
cobalt
code-coverage
codeforces
codemash-precompiler
codereview
codingame
codingconventions
coimbatore
collaborations
colombia
colorado
communities
competitive-programming
competitivecoding
compiler
compose
compose-android
compose-desktop
compose-hiring
compose-ios
compose-mp
compose-ui-showcase
compose-wear
compose-web
connect-audit-events
corda
cork
coroutines
couchbase
coursera
croatia
cryptography
cscenter-course-2016
cucumber-bdd
cyprus
czech
dagger
data2viz
databinding
datascience
dckotlin
debugging
decompose
decouple
denmark
deprecated
detekt
detekt-hint
dev-core
dfw
docs-revamped
dokka
domain-driven-design
doodle
dsl
dublin
dutch
eap
eclipse
ecuador
edinburgh
education
effective-kotlin
effectivekotlin
emacs
embedded-kotlin
estatik
event21-community-content
events
exposed
failgood
fb-internal-demo
feed
firebase
flow
fluid-libraries
forkhandles
forum
fosdem
fp-in-kotlin
framework-elide
freenode
french
fritz2
fuchsia
functional
funktionale
gamedev
ge-kotlin
general-advice
georgia
geospatial
german-lang
getting-started
github-workflows-kt
glance
godot-kotlin
google-io
gradle
graphic
graphkool
graphql
graphql-kotlin
graviton-browser
greece
grpc
gsoc
gui
hackathons
hacktoberfest
hamburg
hamkrest
helios
helsinki
hexagon
hibernate
hikari-cp
hire-me
hiring
hongkong
hoplite
http4k
hungary
hyderabad
image-processing
india
indonesia
inkremental
intellij
intellij-plugins
intellij-tricks
internships
introduce-yourself
io
ios
iran
israel
istanbulcoders
italian
jackson-kotlin
jadx
japanese
jasync-sql
java-to-kotlin-refactoring
javadevelopers
javafx
javalin
javascript
jdbi
jhipster-kotlin
jobsworldwide
jpa
jshdq
juul-libraries
jvm-ir-backend-feedback
jxadapter
k2-early-adopters
kaal
kafka
kakao
kalasim
kapt
karachi
karg
karlsruhe
kash_shell
kaskade
kbuild
kdbc
kgen-doc-tools
kgraphql
kinta
klaxon
klock
kloudformation
kmdc
kmm-español
kmongo
knbt
knote
koalaql
koans
kobalt
kobweb
kodein
kodex
kohesive
koin
koin-dev
komapper
kondor-json
kong
kontent
kontributors
korau
korean
korge
korim
korio
korlibs
korte
kotest
kotest-contributors
kotless
kotlick
kotlin-asia
kotlin-beam
kotlin-by-example
kotlin-csv
kotlin-data-storage
kotlin-foundation
kotlin-fuel
kotlin-in-action
kotlin-inject
kotlin-latam
kotlin-logging
kotlin-multiplatform-contest
kotlin-mumbai
kotlin-native
kotlin-pakistan
kotlin-plugin
kotlin-pune
kotlin-roadmap
kotlin-samples
kotlin-sap
kotlin-serbia
kotlin-spark
kotlin-szeged
kotlin-website
kotlinacademy
kotlinbot
kotlinconf
kotlindl
kotlinforbeginners
kotlingforbeginners
kotlinlondon
kotlinmad
kotlinprogrammers
kotlinsu
kotlintest
kotlintest-devs
kotlintlv
kotlinultimatechallenge
kotlinx-datetime
kotlinx-files
kotlinx-html
kotrix
kotson
kovenant
kprompt
kraph
krawler
kroto-plus
ksp
ktcc
ktfmt
ktlint
ktor
ktp
kubed
kug-leads
kug-torino
kvision
kweb
lambdaworld_cadiz
lanark
language-evolution
language-proposals
latvia
leakcanary
leedskotlinusergroup
lets-have-fun
libgdx
libkgd
library-development
linkeddata
lithuania
london
losangeles
lottie
love
lychee
macedonia
machinelearningbawas
madrid
malaysia
mathematics
meetkotlin
memes
meta
metro-detroit
mexico
miami
micronaut
minnesota
minutest
mirror
mockk
moko
moldova
monsterpuzzle
montreal
moonbean
morocco
motionlayout
mpapt
mu
multiplatform
mumbai
munich
mvikotlin
mvrx
myndocs-oauth2-server
naming
navigation-architecture-component
nepal
new-mexico
new-zealand
newname
nigeria
nodejs
norway
npm-publish
nyc
oceania
ohio-kotlin-users
oldenburg
oolong
opensource
orbit-mvi
osgi
otpisani
package-search
pakistan
panamá
pattern-matching
pbandk
pdx
peru
philippines
phoenix
pinoy
pocketgitclient
polish
popkorn
portugal
practical-functional-programming
proguard
prozis-android-backup
pyhsikal
python
python-contributors
quasar
random
re
react
reaktive
realm
realworldkotlin
reductor
reduks
redux
redux-kotlin
refactoring-to-kotlin
reflect
refreshversions
reports
result
rethink
revolver
rhein-main
rocksdb
romania
room
rpi-pico
rsocket
russian
russian_feed
russian-kotlinasfirst
rx
rxjava
san-diego
science
scotland
scrcast
scrimage
script
scripting
seattle
serialization
server
sg-user-group
singapore
skia-wasm-interop-temp
skrape-it
slovak
snake
sofl-user-group
southafrica
spacemacs
spain
spanish
speaking
spek
spin
splitties
spotify-mobius
spring
spring-security
squarelibraries
stackoverflow
stacks
stayhungrystayfoolish
stdlib
stlouis
strife-discord-lib
strikt
students
stuttgart
sudan
swagger-gradle-codegen
swarm
sweden
swing
swiss-user-group
switzerland
talking-kotlin
tallinn
tampa
teamcity
tegal
tempe
tensorflow
terminal
test
testing
testtestest
texas
tgbotapi
thailand
tornadofx
touchlab-tools
training
tricity-kotlin-user-group
trójmiasto
truth
tunisia
turkey
turkiye
twitter-feed
uae
udacityindia
uk
ukrainian
uniflow
unkonf
uruguay
utah
uuid
vancouver
vankotlin
vertx
videos
vienna
vietnam
vim
vkug
vuejs
web-mpp
webassembly
webrtc
wimix_sentry
wwdc
zircon
Powered by Linen
multiplatform
  • b

    bsimmons

    09/21/2020, 1:57 PM
    So my code auto-complete and highlighting isn't working for
    iosMain
    . So far I've managed by just guessing names and such, but I'm wondering how do I actually get this working on a Mac? Any ideas?
    a
    j
    • 3
    • 5
  • s

    Samuel Michael

    09/21/2020, 3:02 PM
    Still having trouble linking binary framework from KMM to my iOS app. Tried default “pack for xcode” task, installing as a Podfile, and can’t seem to import and reference it from within the iOS app still. Anyone have any tips what worked for them with larger modularized iOS apps?
    w
    • 2
    • 16
  • w

    why

    09/21/2020, 5:19 PM
    Hi, after the latest xcode update, I started getting this error in multiplatform mobile: The following build commands failed: Ld /Users/me/dev/android_projects/myproj/build/ios/iosApp.build/Debug-iphonesimulator/iosApp.build/Objects-normal/arm64/Binary/iosApp normal arm64 edit: error: The linked and embedded framework 'shared.framework' is missing one or more architectures required by this target: arm64. (in target 'iosApp' from project 'iosApp')
    s
    a
    • 3
    • 6
  • a

    Alberto

    09/21/2020, 6:06 PM
    when using "suspend" functions in interfaces (not implementation) for common shared code. How is that "suspend" qualifier translated for iOS code implementing that interface?
    l
    k
    +2
    • 5
    • 7
  • s

    Samuel Michael

    09/21/2020, 10:02 PM
    Anyone know why I might be getting this error/how to fix?
    l
    • 2
    • 3
  • l

    Logan Knight

    09/22/2020, 9:43 AM
    I'm new to gradle and kotlin. I am struggling to understand how things interact. I have an MP project using ktor. I have successfully been able to build and run it using docker. I am not able to get my dev environment working. I am running the server using
    run
    and
    installDist -t
    , but the js is not served. I have found that if I manually copy the js files to
    ${buildDir}/processedResources/jvm/main
    they are served. First I don't know that this is the 'correct' place for them when using
    installDist
    . Second for the life of me I can't seem to figure out how to get gradle to do a simple copy of the files to that dir. Are the js files supposed to be in that dir, and if so what would be a good or the proper way to make that happen?
    • 1
    • 1
  • a

    akapanina

    09/22/2020, 10:38 AM
    Hi folks! Here is a quick question that will help us make Multiplatform better 🙂 Do you use jvm target in your Multiplatform projects? And, if yes, what is it for? 1️⃣ - Yes, for backend 2️⃣ - Yes, for desktop 3️⃣ - Yes, for other purposes 🇳🇴 - Don’t have jvm target in any of my projects
    2️⃣ 15
    1️⃣ 32
    3️⃣ 21
    🇳🇴 8
    k
    s
    +3
    • 6
    • 9
  • j

    Jake

    09/22/2020, 12:41 PM
    I was looking through this documentation looking for information on how to run KMM on an iPhone and not a simulator. Honestly, the docs above have me a little lost. In the past (With Koltin Native libraries) I modified the
    packForXCode
    function to pack a “fat binary” is that still the appropriate action?
    • 1
    • 2
  • d

    Daniele B

    09/22/2020, 1:34 PM
    I’d would like to share another interesting finding for KMP. I started to dig into
    Kotlin/React
    , and I realized it’s really simple to make components, using
    Kotlin-DSL
    HTML elements. I have started to create Web component functions that have exactly the same API of JetpackCompose composables (e.g. NavigationBar, NavigationItem). So, I can now build a webApp with Jetpack composables, still using Kotlin! It’s really awesome. I believe someone (maybe JetBrains itself) will eventually extend JetpackCompose to web, because it makes a lot of sense. I can see in the near future we will just have 2 UI frameworks:
    JetpackCompose
    (for Android, Desktop and Web) and
    SwiftUI
    (for iPhone, iPad, Mac, etc.). I don’t even think React will last, because JetBrains already gained so much expertise that they can easily write their own efficient web reactive framework in Kotlin/JS, based on
    StateFlow
    using JetpackCompose components for the UI, bypassing React completely. So, my suggestion for everyone is to really start learning JetpackCompose and SwiftUI, because this is going to be the base for any app of the future. All the rest will become legacy.
    :yes: 2
    j
    n
    a
    • 4
    • 12
  • d

    Diego

    09/22/2020, 2:51 PM
    Hi guys. I am an android developer and in my company we are evaluating pros and cons of using Kotlin Multiplatform for all the new developments. We are developing a sample app (a shopping cart) that runs already on iOS and android but also we want to use the same business logic for the web (ideally WebAssembly). I'm not a web developer and I'm struggling to understand how to demo the WebAssembly version. Is there a hello world example that shows how to create and use WebAssembly from a Kotlin multiplatform project? Thanks in advance!
    b
    • 2
    • 5
  • j

    janvladimirmostert

    09/23/2020, 7:19 AM
    when using directory structure src jvmMain/resources jsMain how does one get a resource from src/jvmMain/resources?
    javaClass.getResourceAsStream("blah.txt")
    doesn't seem to work when using that directory structure, works fine when it's a normal
    src/main/resources
    structured project
    c
    • 2
    • 1
  • k

    KamilH

    09/23/2020, 10:25 AM
    Is it possible to create a Multiplatform library and publish it in Cocoapods? We are aiming to create a library that will ease an usage of our API by hiding endpoints behind library API. We want to write two separate libraries to support both iOS and Android. I thought that maybe it would be a good use-case for KMP, but I’m not sure if it will be possible to publish it in Cocoapods to let iOS developers easily integrate the library
    👍 1
    r
    c
    k
    • 4
    • 11
  • c

    coolcat

    09/23/2020, 11:45 AM
    I have added the Cocoapods plugin to my KMP project as described here https://kotlinlang.org/docs/reference/native/cocoapods.html. But the resulting .podspec file contains a line that looks like this:
    "$REPO_ROOT/../../../../../../private/var/folders/ps/l3tx8c517t19l8p14jq3zvsh0000gp/T/wrap12070loc/gradlew" -p "$REPO_ROOT" ::syncFramework \
    Most other generated podspecs I have seen in sample projects look like
    "$REPO_ROOT/../gradlew" -p "$REPO_ROOT" :core:syncFramework \
    I am concerned it refers to a temporary folder on my machine which may disappear in future. Does anybody know what the problem may be?
    • 1
    • 1
  • h

    Hailong

    09/23/2020, 1:23 PM
    I have a KMP multi-platform library for Java-Swing, Android, iOS. There is no problem on Java-Swing, iOS, but an error is reported when used on Android. Has anyone encountered this kind of error? How to solve it, I have been doing it for a day... 1、KMP-common gradle/wrapper/gradle-wrapper.properties distributionUrl= xxx/gradle-6.5-all.zip build.gradle.kts kotlin { jvm{ compilations.all { kotlinOptions.jvmTarget = "1.8" // Default value: "1.6" } } sourceSets{ val jvmMain by getting { dependencies { implementation(Deps.NGJvm.log_jvm_common) implementation (Deps.NGJvm.common_net) implementation(Deps.NGJvm.order_calculator) implementation(Deps.NGJvm.common_utils) } } } } 2、Java Swing --> It work well gradle/wrapper/gradle-wrapper.properties distributionUrl= xxx/gradle-4.10-all.zip 3、Android --> build error build.gradle classpath 'com.android.tools.build:gradle:3.1.4' implementation ('com.xx.xx.kmp.common.net:NGNet-jvm:1.0.1-SNAPSHOT'){ exclude group: 'com.xx.xx.common' exclude group: 'com.xx.xx.business.common' exclude group: 'com.xx.xx.sjst' } gradle/wrapper/gradle-wrapper.properties distributionUrl= xxx/gradle-4.10-all.zip --------- Error messag ------------
    Task :app:transformClassesWithStackFramesFixerForDebug
    Exception in thread "main" java.lang.IllegalArgumentException: Type without superclass: module-info at com.google.common.base.Preconditions.checkArgument(Preconditions.java:191) at com.google.devtools.build.android.desugar.DefaultMethodClassFixer.visit(DefaultMethodClassFixer.java:80) at org.objectweb.asm.ClassVisitor.visit(ClassVisitor.java:113) at com.google.devtools.build.android.desugar.InterfaceDesugaring.visit(InterfaceDesugaring.java:97) at org.objectweb.asm.ClassReader.accept(ClassReader.java:621) at org.objectweb.asm.ClassReader.accept(ClassReader.java:500) at com.google.devtools.build.android.desugar.Desugar.desugarClassesInInput(Desugar.java:477) at com.google.devtools.build.android.desugar.Desugar.desugarOneInput(Desugar.java:361) at com.google.devtools.build.android.desugar.Desugar.desugar(Desugar.java:314) at com.google.devtools.build.android.desugar.Desugar.main(Desugar.java:711)
    Task :app:transformClassesWithDesugarForDebug FAILED
    FAILURE: Build failed with an exception.
    • 1
    • 1
  • t

    thalescm

    09/23/2020, 3:29 PM
    Hi, I have a jvm project which I’m trying to turn into multiplatform, as I want to extend that to other platforms and there is things I’m able to share. The problem is, my main jvm target (named
    app
    ), not multiplatform, is not recognizing the code from the multiplatform module (named
    shared
    ). Gradle sync is fine, so I imagine the problem is not on there. app/build.gradle.kts:
    plugins {
        kotlin("jvm")
        application
        id("org.openjfx.javafxplugin") version("0.0.8")
        kotlin("plugin.serialization")
    }
    
    dependencies {
        <other jvm deps>
    
        implementation(project(":shared"))
    }
    
    group = "group"
    version = "1.0-SNAPSHOT"
    
    application {
        mainClass.set("pac.kage.MainKt")
    }
    
    javafx {
        version = "12"
        modules = listOf("javafx.controls", "javafx.fxml", "javafx.graphics")
    }
    
    tasks.withType<JavaExec>().configureEach {
        doFirst {
            println("Desktop classpath: ${classpath.asPath}")
            jvmArgs = listOf(
                    "--module-path", classpath.asPath,
                    "--add-modules", "javafx.controls",
                    "--add-modules", "javafx.fxml",
                    "--add-modules", "javafx.graphics"
            )
        }
    }
    
    tasks.withType<Test>().configureEach {
        useJUnitPlatform()
    }
    And the shared/build.gradle.kts:
    plugins {
        kotlin("multiplatform")
        id("kotlinx-serialization")
    }
    
    kotlin {
        jvm {
            val main by compilations.getting {
                output
            }
        }
        sourceSets {
            val commonMain by getting {
                dependencies {
                    implementation(kotlin("stdlib-common"))
                }
            }
            val jvmMain by getting {
                dependencies {
                    implementation(ExternalDeps.jipes)
                    implementation(kotlin("stdlib"))
                }
            }
        }
    }
    s
    • 2
    • 2
  • k

    Kris Wong

    09/23/2020, 5:55 PM
    I notice that JVM tests produce test result files in binary format. is that expected? my build server (bamboo) expects xml.
    b
    • 2
    • 10
  • j

    John Gainfort

    09/23/2020, 6:29 PM
    Too add to the list of questions. I am working on a kotlin multi platform library (only android and js for now), I have the library setup following what I think is latest guidelines but when I am trying to import the library into an android app through mavenLocal(), so not pointing to the project, I am getting the following error
    Unable to resolve dependency for ':app@debug/compileClasspath': Could not resolve tech.ctawave.cmcd:cmcd-android:0.0.1.
    Has anyone run into this? gradle 6.6.1, kt 1.4.10, and I have set
    android {
       publishAllLibraryVariants()
    }
    within the library gradle. Any help is appreciated.
    a
    • 2
    • 8
  • a

    ankushg

    09/24/2020, 1:52 AM
    Does anyone know of an example of an opensource multiplatform project that shares navigation state through Multiplatform?
    a
    • 2
    • 1
  • j

    jw

    09/24/2020, 5:27 PM
    is there a way to get the Test task which corresponds to the jvm test compilation through the DSL? Or should I do name-based lookkup?
    k
    m
    • 3
    • 6
  • s

    StefMa

    09/25/2020, 9:23 AM
    I have an issue that if I run android instrumentation tests the
    androidTests
    are compiled and running as well. Which is bad because I don't want this 🙃 . can I somehow exclude the
    androidTest
    sourceSet from the
    androidAndroidTest
    sourceSet? I tried already multiple things e.g. setting the
    srcDris
    of
    android.sourceSet.androidTest.setSrcDirs()
    but it seems they will always execute them. Regardless of what I put into the
    srcDirs
    .
    • 1
    • 1
  • e

    Evan

    09/25/2020, 9:17 PM
    I thought I had this Ktor networking with an MVP architecture working on iOS, but now I’m getting the following exception when trying to dispatch the result on
    Dispatchers.Main
    . Anyone else running into an error like this?
    t
    n
    • 3
    • 10
  • s

    Shawn Witte

    09/26/2020, 4:47 AM
    Hello everyone. I've been playing with multiplatform a bit and I'm wondering if anyone has some insight on the pros/cons of using
    expect/actual
    vs using an interface. I'm especially curious if there are use cases for
    expect/actual
    that can't be solved with an interface or are obviously better suited to the
    expect/actual
    pattern. I asked a question on the forums, but it didn't get any traction.
    i
    s
    • 3
    • 3
  • s

    Sam Garfinkel

    09/26/2020, 10:42 PM
    Are there any popular multiplatform client-side networking libraries other than Ktor?
    r
    • 2
    • 1
  • j

    John O'Reilly

    09/27/2020, 10:59 AM
    Regarding support for calling suspend functions from Swift/Objective C.....I think this was asked here before but don't remember seeing an answer.....is anyone aware of how this is implemented under the good, and what is setup for example regarding dispatcher used and cancellations? I think many projects are still rolling their own approach to this primarily so they have control for example of lifecycle aware cancellation.
    s
    • 2
    • 5
  • w

    william

    09/27/2020, 3:58 PM
    i have been having issues with a multiplatform project where a JVM module depends on a multiplatform module (targetting jvm and others). the JVM module is unable to see the public classes from the multiplatform module. I have created a bug here but if anyone has advice i'd appreciate it https://youtrack.jetbrains.com/issue/KT-42227
    s
    r
    • 3
    • 3
  • s

    spierce7

    09/28/2020, 12:11 AM
    Does the kotlin stdlib provide a way to get the current timestamp, or am I imagining that that was added?
    w
    b
    y
    • 4
    • 7
  • h

    Hailong

    09/28/2020, 3:07 AM
    Hi,guys Can I use KMP(kotlin 1.4.10) with AGP 3.1.2 in the Android project?
    l
    • 2
    • 4
  • n

    nrobi

    09/28/2020, 7:29 AM
    Anyone had issues with
    SqlDelight 1.4.3
    native
    dependency? Can’t seem to resolve
    NativeSqliteDriver
    , while
    AndroidSqliteDriver
    worsk well. Kotlin
    1.4.0
    l
    j
    j
    • 4
    • 13
  • b

    bodo

    09/28/2020, 8:38 AM
    Hi guys, is it possible to share resources (strings, dimens, drawables) with kmp?
    l
    • 2
    • 1
  • k

    KamilH

    09/28/2020, 12:27 PM
    I’m trying to add
    cocoapods
    plugin to my very simple library project and it fails at:
    Execution failed for task ':podspec'.
    > The Gradle wrapper is required to run the build from Xcode.
    
    Please run the same command with `-Pkotlin.native.cocoapods.generate.wrapper=true` or run the `:wrapper` task to generate the wrapper manually.
    As suggested I tried to run
    gradle wrapper
    and it fails:
    An exception occurred applying plugin request [id: 'org.jetbrains.kotlin.multiplatform', version: '1.4.10']
    > Failed to apply plugin [id 'org.jetbrains.kotlin.multiplatform']
       > The current Gradle version 5.4.1 is not compatible with the Kotlin Multiplatform plugin. Please use Gradle 6.0 or newer, or the previous version of the Kotlin plugin.
    Why is that happening? In my
    gradle-wrapper.properties
    I’m using
    distributionUrl=https\:<//services.gradle.org/distributions/gradle-6.6.1-bin.zip>
    w
    • 2
    • 9
Powered by Linen
Title
k

KamilH

09/28/2020, 12:27 PM
I’m trying to add
cocoapods
plugin to my very simple library project and it fails at:
Execution failed for task ':podspec'.
> The Gradle wrapper is required to run the build from Xcode.

Please run the same command with `-Pkotlin.native.cocoapods.generate.wrapper=true` or run the `:wrapper` task to generate the wrapper manually.
As suggested I tried to run
gradle wrapper
and it fails:
An exception occurred applying plugin request [id: 'org.jetbrains.kotlin.multiplatform', version: '1.4.10']
> Failed to apply plugin [id 'org.jetbrains.kotlin.multiplatform']
   > The current Gradle version 5.4.1 is not compatible with the Kotlin Multiplatform plugin. Please use Gradle 6.0 or newer, or the previous version of the Kotlin plugin.
Why is that happening? In my
gradle-wrapper.properties
I’m using
distributionUrl=https\:<//services.gradle.org/distributions/gradle-6.6.1-bin.zip>
w

william

09/28/2020, 12:56 PM
is there a particular version defined in a gradle file somewhere?
also maybe try
./gradlew --gradle-version 6.6.1
or whatever the upgrade command is
k

KamilH

09/28/2020, 12:59 PM
No, when I’m trying to
find in path
5.4.1 there is no results
I also checked
gradle --version
and it indeed shows
5.4.1
The thing is I can’t find a command to upgrade
gradle
Trying to install wrapper in the project directory with the command you recommended also fails:
gradle wrapper --gradle-version 6.6.1

FAILURE: Build failed with an exception.

* Where:
Build file 'PROJECT_PATH' line: 2

* What went wrong:
An exception occurred applying plugin request [id: 'org.jetbrains.kotlin.multiplatform', version: '1.4.10']
> Failed to apply plugin [id 'org.jetbrains.kotlin.multiplatform']
   > The current Gradle version 5.4.1 is not compatible with the Kotlin Multiplatform plugin. Please use Gradle 6.0 or newer, or the previous version of the Kotlin plugin.
OK, I finally solved it by updating
gradle
via `brew`:
brew upgrade gradle
then running
gradle wrapper
to install wrapper in the project directory and finally synchronizing project
w

william

09/28/2020, 10:14 PM
do you have a gradle wrapper in your project?
k

KamilH

09/29/2020, 5:18 AM
It turned out I didn’t have because it seems like
gradle
couldn’t install it in the project because it was on too low version. After manually upgrading system-wise gradle to 6.1.1 it installed gradle wraper in the project properly
View count: 3