Archie G. Quiñones
Archie G. Quiñones

Reputation: 13698

Intellij generated Project for Kotlin Multiplatform always show build failed

I am using intellij to create a Kotlin Multiplatform Project for Android and iOS. I have not done any changes to the generated template but when opening the iOS Project in xcode and running it, it shows Build Failed with this logs.

/Users/archie.quinones/Library/Developer/Xcode/DerivedData/iosApp-bwuvtubwlwgrwofszlveznlcosbj/Build/Intermediates.noindex/iosApp.build/Debug-iphonesimulator/app.build/Script-F861D812207FA4320085E80D.sh: line 2: /Users/archie.quinones/IdeaProjects/MppApplication/iosApp/../gradlew: No such file or directory Command PhaseScriptExecution failed with a nonzero exit code

Can some guide me how to make this work?

Thank you very much.

Upvotes: 0

Views: 961

Answers (1)

Artyom Degtyarev
Artyom Degtyarev

Reputation: 2888

There is a small confusion here. AFAIK, there should be a note in your Gradle script, with something like

    //Before opening the project from iosApp directory in Xcode,
    // make sure all Gradle infrastructure exists (gradle.wrapper, gradlew).

So please, open the project directory in Terminal and execute gradle wrapper task manually.
This is a known issue of the Kotlin/MPP wizard, here is the ticket. It is not a problem, as you can produce the wrapper by yourself, but I agree, that it might be unobvious.

Upvotes: 4

Related Questions