Fixed
Status Update
Comments
ap...@google.com <ap...@google.com> #2
Can you share your Gradle build file and how room-compiler
is being setup? The error is indicating that the Room processor likely did not run which in turns means the generated implementation of the database was not created and can't be found.
jb...@google.com <jb...@google.com> #3
This is my gradle file. I need to re -explain it runs well in Android, iOS, and Desktop's debug.It only crash when runRelease on desktop.
import org.jetbrains.compose.desktop.application.dsl.TargetFormat
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
import org.jetbrains.kotlin.gradle.tasks.KotlinCompilationTask
plugins {
alias(libs.plugins.kotlinMultiplatform)
alias(libs.plugins.androidApplication)
alias(libs.plugins.composeMultiplatform)
alias(libs.plugins.composeCompiler)
alias(libs.plugins.kotlinCocoapods)
alias(libs.plugins.googleKsp)
alias(libs.plugins.kotlinSerialization)
alias(libs.plugins.androidxRoom)
}
kotlin {
androidTarget {
compilerOptions {
jvmTarget.set(JvmTarget.JVM_11)
}
}
iosX64()
iosArm64()
iosSimulatorArm64()
cocoapods {
summary = "Some description for the Shared Module"
homepage = "Link to the Shared Module homepage"
version = "1.0"
ios.deploymentTarget = "13.0"
podfile = project.file("../iosApp/Podfile")
framework {
baseName = "ComposeApp"
isStatic = true
}
}
jvm("desktop")
sourceSets {
val desktopMain by getting
androidMain.dependencies {
implementation(compose.preview)
implementation(libs.androidx.activity.compose)
}
commonMain.dependencies {
implementation(compose.runtime)
implementation(compose.foundation)
implementation(compose.material3)
implementation(compose.ui)
implementation(compose.components.resources)
implementation(compose.components.uiToolingPreview)
implementation(libs.androidx.lifecycle.viewmodel)
implementation(libs.androidx.lifecycle.runtime.compose)
implementation(libs.androidx.navigation)
// Serialization
implementation(libs.kotlinx.serialization.json)
// Room
implementation(libs.androidx.room.runtime)
implementation(libs.androidx.sqlite.bundled)
}
desktopMain.dependencies {
implementation(compose.desktop.currentOs)
implementation(libs.kotlinx.coroutines.swing)
}
}
}
android {
namespace = "xxx"
compileSdk = libs.versions.android.compileSdk.get().toInt()
defaultConfig {
applicationId = "xxx"
minSdk = libs.versions.android.minSdk.get().toInt()
targetSdk = libs.versions.android.targetSdk.get().toInt()
versionCode = 1
versionName = "1.0"
}
packaging {
resources {
excludes += "/META-INF/{AL2.0,LGPL2.1}"
}
}
buildTypes {
getByName("release") {
isMinifyEnabled = false
}
}
compileOptions {
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
}
}
dependencies {
debugImplementation(compose.uiTooling)
}
compose.desktop {
application {
mainClass = "xxx.MainKt"
nativeDistributions {
targetFormats(TargetFormat.Dmg, TargetFormat.Msi, TargetFormat.Deb)
packageName = "xxx"
packageVersion = "1.0.0"
}
}
}
dependencies {
kspCommonMainMetadata(libs.koin.ksp.compiler)
listOf(
"kspAndroid",
"kspDesktop",
"kspIosX64",
"kspIosArm64",
"kspIosSimulatorArm64"
).forEach {
add(it, libs.androidx.room.compiler)
}
}
project.tasks.withType(KotlinCompilationTask::class.java).configureEach {
if (name != "kspCommonMainKotlinMetadata") {
dependsOn("kspCommonMainKotlinMetadata")
}
}
kotlin.sourceSets.commonMain {
kotlin.srcDir("build/generated/ksp/metadata/commonMain/kotlin")
}
room {
schemaDirectory("$projectDir/schemas")
}
Description
Component used: Activity Version used: 1.2.0-alpha03
Along with , there's a separate API for that uses the .
startActivityForResult()
startIntentSenderForResult()
IntentSender
returned byPendingResult.getIntentSender()
Since this is used by APIs such as and the result it also delivered to the activity's
ResolvableApiException
onActivityResult()
, it would be nice if there was a contract available (similar toStartActivityForResult
) that would make it possible to pass anIntentSender
(and perhaps all of those optional method parameters) in as input.