Код: Выделить всё
:composeApp:wasmJsMain: Could not resolve androidx.room:room-runtime:2.7.0-beta01.
Required by:
project :composeApp
Possible solution:
- Declare repository providing the artifact, see the documentation at https://docs.gradle.org/current/userguide/declaring_repositories.html
:composeApp:wasmJsMain: Could not resolve androidx.sqlite:sqlite-bundled:2.5.0-beta01.
Required by:
project :composeApp
Possible solution:
- Declare repository providing the artifact, see the documentation at https://docs.gradle.org/current/userguide/declaring_repositories.html
:composeApp:wasmJsTest: Could not resolve androidx.room:room-runtime:2.7.0-beta01.
Required by:
project :composeApp
Possible solution:
- Declare repository providing the artifact, see the documentation at https://docs.gradle.org/current/userguide/declaring_repositories.html
:composeApp:wasmJsTest: Could not resolve androidx.sqlite:sqlite-bundled:2.5.0-beta01.
Required by:
project :composeApp
Possible solution:
- Declare repository providing the artifact, see the documentation at https://docs.gradle.org/current/userguide/declaring_repositories.html
< /code>
Версии, которые я использую: < /p>
sqlite = "2.5.0-beta01"
room = "2.7.0-beta01"
< /code>
У меня уже есть артефакты Mavencentral и Google в настройках.gradle.kts: < /p>
pluginManagement {
repositories {
google {
mavenContent {
includeGroupAndSubgroups("androidx")
includeGroupAndSubgroups("com.android")
includeGroupAndSubgroups("com.google")
}
}
mavenCentral()
gradlePluginPortal()
}
}
dependencyResolutionManagement {
repositories {
google {
mavenContent {
includeGroupAndSubgroups("androidx")
includeGroupAndSubgroups("com.android")
includeGroupAndSubgroups("com.google")
}
}
mavenCentral()
}
}
build.gradle.kts (Project):
Код: Выделить всё
plugins {
...
alias(libs.plugins.ksp) apply false
alias(libs.plugins.room) apply false
}
< /code>
build.gradle.kts (composeapp): < /p>
plugins {
...
alias(libs.plugins.ksp)
alias(libs.plugins.room)
}
kotlin {
androidTarget {
@OptIn(ExperimentalKotlinGradlePluginApi::class)
compilerOptions {
jvmTarget.set(JvmTarget.JVM_11)
}
}
listOf(
iosX64(),
iosArm64(),
iosSimulatorArm64()
).forEach { iosTarget ->
iosTarget.binaries.framework {
baseName = "ComposeApp"
isStatic = true
}
}
jvm("desktop")
@OptIn(ExperimentalWasmDsl::class)
wasmJs {
...
}
room {
schemaDirectory("$projectDir/schemas")
}
sourceSets {
val desktopMain by getting
androidMain.dependencies {
...
}
commonMain.dependencies {
...
implementation(libs.androidx.room.runtime)
implementation(libs.sqlite.bundled)
}
desktopMain.dependencies {
...
}
nativeMain.dependencies {
...
}
wasmJsMain.dependencies {
...
}
dependencies {
ksp(libs.androidx.room.compiler)
}
}
}
Подробнее здесь: https://stackoverflow.com/questions/794 ... solve-andr