How to add debug symbols upload
Description
I followed this tutorial https://docs.sentry.io/platforms/kotlin/guides/kotlin-multiplatform/debug-symbols/
but it didn't work at all
Caused by: org.gradle.internal.component.resolution.failure.exception.VariantSelectionByAttributesException: No matching variant of io.sentry:sentry-kotlin-extensions:8.14.0 was found. The consumer was configured to find a library for use during 'kotlin-metadata', preferably optimized for non-jvm, as well as attribute 'org.jetbrains.kotlin.native.target' with value 'ios_arm64', attribute 'org.jetbrains.kotlin.platform.type' with value 'native' but:
- Variant 'apiElements' declares a library for use during compile-time, preferably optimized for standard JVMs:
- Incompatible because this component declares a component, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'jvm' and the consumer needed a component, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'native'
- Other compatible attribute:
- Doesn't say anything about org.jetbrains.kotlin.native.target (required 'ios_arm64')
This build error occures after adding sentry android plugin along with sentry kmp plugin
@T8RIN it looks like you're applying the plugin to the shared module shared/build.gradle.kts instead of the build gradle file within your native Android module
yes, it is, but i have no android module, we have only one shared build.gradle.kts
I assume you have an Android app (even if in another repository) that consumes your KMP framework
then you need to apply the gradle plugin (id("io.sentry.android.gradle") version "5.8.1") to the Android app directly
i have kmp app, it have only shared build gradle and no separate modules, so all setup to android and ios comes in this shared build gradle of composeApp module
if it's a compose multiplatform app then you should instead read the Compose Multiplatform guide: https://docs.sentry.io/platforms/kotlin/guides/compose-multiplatform/#debug-symbols
the steps here are different for Android than on a pure KMP app
I haven't adjusted the guide yet but you need to pass the UUID for the proguard file in Sentry.init via the proguardUuid option
Okay thanks, i will look