好吧,我尝试从 kotlin-native repo 运行计算器示例。
遵循以下步骤:
要构建和运行示例,请执行以下操作:
使用 Xcode 打开 samples/calculator/calculator.xcodeproj。
通过项目导航器打开项目的目标,转到“常规”选项卡。在“身份”部分中,将捆绑 ID 更改为反向 DNS 格式的唯一字符串。然后在“签名”部分选择团队。请参阅 Xcode 。文档以获取更多信息。
现在使用 Xcode 在连接的 iPhone 上构建并运行应用程序。
但是当我尝试在 Xcode 中构建应用程序时,我收到以下错误,并且它的日志如下:
…………
The target is not enabled on the current host: linux .
Target 'linux' of artifact 'libgit2' is not supported on the current host .
The target is not enabled on the current host: linux .
The target is not enabled on the current host: linux .
The target is not enabled on the current host: linux .
The target is not enabled on the current host: linux
Target 'linux' of artifact 'libcurl' is not supported on the current host .
The target is not enabled on the current host: linux .
The target is not enabled on the current host: linux
The target is not enabled on the current host: linux
The target is not enabled on the current host: linux
The target is not enabled on the current host: linux
The target is not enabled on the current host: raspberrypi
Target 'linux' of artifact 'sdl' is not supported on the current host
Target 'raspberrypi' of artifact 'sdl' is not supported on the current host
The target is not enabled on the current host: linux
The target is not enabled on the current host: raspberrypi
Target 'linux' of artifact 'tetris' is not supported on the current host
Target 'raspberrypi' of artifact 'tetris' is not supported on the current host
The target is not enabled on the current host: linux
The target is not enabled on the current host: mingw
Target 'linux' of artifact 'ffmpeg' is not supported on the current host
Target 'mingw' of artifact 'ffmpeg' is not supported on the current host
The target is not enabled on the current host: linux
The target is not enabled on the current host: mingw
Target 'linux' of artifact 'sdl' is not supported on the current host
Target 'mingw' of artifact 'sdl' is not supported on the current host
The target is not enabled on the current host: linux
The target is not enabled on the current host: mingw
Target 'linux' of artifact 'Player' is not supported on the current host
Target 'mingw' of artifact 'Player' is not supported on the current host
The target is not enabled on the current host: mingw
:calculator:checkKonanCompiler
:calculator:compileKonanKotlinArithmeticParserIphone FAILED
FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ':calculator:compileKonanKotlinArithmeticParserIphone'.
Classpath of the tool is empty: konanc
Probably the 'konan.home' project property contains an incorrect path.
Please change it to the compiler root directory and rerun the build.
Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
Get more help at https://help.gradle.org
BUILD FAILED in 8s
2 actionable tasks: 2 executed
Command /bin/sh failed with exit code 1
谢谢!