KMM - 在项目":shared"中找不到错误任务"embedAndSignAppleFrameworkForXcode"



我创建了一个项目来演示Kotlin Multiplatform Mobile。我在Android和iOS两种设备上都成功地构建并运行了这款游戏。之后,我在iOS上重新运行了这个项目。它出错了。

> Configure project :shared
Kotlin Multiplatform Projects are an Alpha feature. See: https://kotlinlang.org/docs/reference/evolution/components-stability.html. To hide this message, add 'kotlin.mpp.stability.nowarn=true' to the Gradle properties.

FAILURE: Build failed with an exception.
* What went wrong:
Task 'embedAndSignAppleFrameworkForXcode' not found in project ':shared'.
* Try:
Run gradlew tasks to get a list of available tasks. 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 1s
Command PhaseScriptExecution failed with a nonzero exit code
** BUILD FAILED **

The following build commands failed:
PhaseScriptExecution Run Script /Volumes/Data/ProjectsKMM/DemoNetworkAPI/build/ios/iosApp.build/Debug-iphonesimulator/iosApp.build/Script-7555FFB5242A651A00829871.sh
(1 failure)

这是我在Github上的项目点击这里。请查看并帮我找出错误。

提前感谢。

您需要至少使用Kotlin 1.5.20才能使用embedAndSignAppleFrameworkForXcode(更多信息请参见https://blog.jetbrains.com/kotlin/2021/07/multiplatform-gradle-plugin-improved-for-connecting-kmm-modules/)

embedAndSignPodAppleFrameworkForXcode为我工作

Kotlin插件版本:212-1.7.10-release-333-AS5457.46

这是xcode/Android Studio关于失败任务的建议

Task 'embedAndSignAppleFrameworkForXcode' not found in project ':shared'. Some candidates are: 'embedAndSignPodAppleFrameworkForXcode'.

相关内容

最新更新