The Default Kotlin Hierarchy Template was not applied to 'project ':core'':
Explicit .dependsOn() edges were configured for the following source sets:
[iosArm64Main, iosArm64Test, iosMain, iosSimulatorArm64Main, iosSimulatorArm64Test, iosTest, iosX64Main, iosX64Test]
Consider removing dependsOn-calls or disabling the default template by adding
'kotlin.mpp.applyDefaultHierarchyTemplate=false'
to your gradle.properties
У меня есть Mac с чипом M2, это файл build.gradle.kts:
Я пытаюсь синхронизировать и собрать проект в KMP, но возникает ошибка: [code]The Default Kotlin Hierarchy Template was not applied to 'project ':core'': Explicit .dependsOn() edges were configured for the following source sets: [iosArm64Main, iosArm64Test, iosMain, iosSimulatorArm64Main, iosSimulatorArm64Test, iosTest, iosX64Main, iosX64Test]
Consider removing dependsOn-calls or disabling the default template by adding 'kotlin.mpp.applyDefaultHierarchyTemplate=false' to your gradle.properties [/code] У меня есть Mac с чипом M2, это файл build.gradle.kts: [code]plugins { kotlin("multiplatform") kotlin("native.cocoapods") id("com.android.library") id("kotlinx-serialization") }
cocoapods { summary = "Some description for the Shared Module" homepage = "Link to the Shared Module homepage" version = "1.0" ios.deploymentTarget = "14.1" podfile = project.file("../iosApp/Podfile") framework { baseName = "core" isStatic = true } pod("UICKeyChainStore") pod("FirebaseCore") pod("FirebaseInstanceID") }
val coroutines = "1.8.0" val ktor = "2.3.9"
sourceSets { all { languageSettings.optIn("kotlin.RequiresOptIn") languageSettings.optIn("kotlin.experimental.ExperimentalObjCName") }
val commonMain by getting { dependencies { implementation("org.jetbrains.kotlin:kotlin-stdlib-common") implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:$coroutines")
// Http implementation("org.jetbrains.kotlinx:kotlinx-serialization-core:1.5.1") implementation("io.ktor:ktor-serialization-kotlinx-json:$ktor") implementation("io.ktor:ktor-client-core:$ktor") implementation("io.ktor:ktor-client-serialization:$ktor") implementation("io.ktor:ktor-client-logging:$ktor") implementation("io.ktor:ktor-client-content-negotiation:$ktor") } } val commonTest by getting { dependencies { implementation(kotlin("test")) } } val androidMain by getting { dependencies { api("io.ktor:ktor-client-okhttp:$ktor") implementation("io.ktor:ktor-client-serialization-jvm:$ktor") implementation("io.ktor:ktor-client-logging-jvm:$ktor") implementation("com.facebook.stetho:stetho-okhttp3:1.6.0")
implementation("com.google.firebase:firebase-core:21.1.1") implementation("com.google.firebase:firebase-messaging:23.4.1") } } val androidUnitTest by getting val androidInstrumentedTest by getting val iosX64Main by getting val iosArm64Main by getting val iosSimulatorArm64Main by getting val iosMain by creating { dependsOn(commonMain) iosX64Main.dependsOn(this) iosArm64Main.dependsOn(this) iosSimulatorArm64Main.dependsOn(this)
dependencies { // Http //implementation("org.jetbrains.kotlinx:kotlinx-serialization-runtime-native:1.0-M1-1.4.0-rc") implementation("org.jetbrains.kotlinx:kotlinx-serialization-core:1.5.1") implementation("io.ktor:ktor-client-ios:$ktor") //implementation("io.ktor:ktor-client-serialization-native:1.3.2") //implementation("io.ktor:ktor-client-logging-native:1.3.2") } } val iosX64Test by getting val iosArm64Test by getting val iosSimulatorArm64Test by getting val iosTest by creating { dependsOn(commonTest) iosX64Test.dependsOn(this) iosArm64Test.dependsOn(this) iosSimulatorArm64Test.dependsOn(this) } } }
Я пытаюсь синхронизировать и собрать проект в KMP, но возникает ошибка:
The Default Kotlin Hierarchy Template was not applied to 'project ':core'':
Explicit .dependsOn() edges were configured for the following source sets:
При попытке создать многоплатформенное приложение Kotlin для iOS (как из Xcode, так и из Android Studio) возвращается ошибка, связанная с linkDebugFramework и сценарием запуска PhaseScriptExecution.
Я пытаюсь начать с Kotlin Multiplatform, поэтому установил плагин и создал проект по умолчанию.
Как только все настроено, я могу запустить его на Android, но У меня нет конфигурации iOSApp. Когда я пытаюсь его создать, я понимаю, что список целей...