问题描述
我先在KMM中创建了新鲜项目(Hello World),然后创建了他们的官方网站.在android中,它运行平稳,但是当我尝试在XCode中运行时,由于给出的我无法构建/运行xcode项目
,它给出了错误.我已附上我的错误的屏幕截图和日志.我猜想在KMM平台中没有以某种方式生成xcode方案.谁能帮我了解我在想什么?任何帮助都将被申请.
I have created fresh project(Hello World) in KMM followed by their official website. In android it works smooth but when I am trying to run in XCode it's giving errors because of which I am unable to build / run the xcode project
. I have attached screenshots and logs for my errors. Somehow xcode scheme is not getting generated in the KMM platform that's what I am guessing.Can anyone please help me understand what am I missing?Any help would be appriciated.
Following is my dev env:
Xcode 11.4.1
Android 4.1.2
Kotling Plugin version 1.4.30 (stable)
KMM 0.2.0```
XCode Logs:
> Task :shared:compileKotlinIosX64
Downloading native dependencies (LLVM, sysroot etc). This is a one-time action performed only on the first run of the compiler.
Extracting dependency: /Users/fatin/.konan/cache/clang-llvm-apple-8.0.0-darwin-macos.tar.gz into /Users/fatin/.konan/dependencies
e: java.lang.RuntimeException: Cannot extract archive with dependency: /Users/fatin/.konan/cache/clang-llvm-apple-8.0.0-darwin-macos.tar.gz.
> Task :shared:compileKotlinIosX64 FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':shared:compileKotlinIosX64'.
> Compilation finished with errors
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 7s
1 actionable task: 1 executed
Command PhaseScriptExecution failed with a nonzero exit code ```
[![enter image description here][3]][3]
推荐答案
为此,我与社区进行了接触,并最终找到了解决方案.这是我提出并解决了该问题的链接到该问题.
I reached out to community for this and finally found the solution. Here is the link to that issue which I raised and solved this problem.
如果其他任何人都遇到了同样的问题,则可能是导致Kotlin文件损坏的原因.另外,请尝试根据注释检查XCode中的cmd线工具.
If anyone else is going through this same issue it mostly cause of corrupted kotlin file.Also try checking your cmd line tools in XCode as per comments.
希望这对某人有帮助.干杯.
Hope this helps someone. Cheers.
这篇关于Kotlin Multiplatform Mobile无法在iOS上运行:任务':shared:compileKotlinIosX64'的执行失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!