RevenueCat / purchases-android

Android in-app purchases and subscriptions made easy.
https://www.revenuecat.com/
MIT License
261 stars 53 forks source link

Showing DebugRevenueCatBottomSheet triggers java.lang.NoSuchMethodError #1905

Open GiorgioKozmani opened 2 weeks ago

GiorgioKozmani commented 2 weeks ago

Describe the bug I'm trying to test a purchase in an android app. Whenever I try to show the DebugRevenueCatBottomSheet the app crashes with

java.lang.NoSuchMethodError: No static method rememberModalBottomSheetState(ZLkotlin/jvm/functions/Function1;Landroidx/compose/runtime/Composer;II)Landroidx/compose/material3/SheetState; in class Landroidx/compose/material3/ModalBottomSheet_androidKt; or its super classes (declaration of 'androidx.compose.material3.ModalBottomSheet_androidKt'

  1. Environment
    1. Platform: Android
    2. SDK version: 8.9.0
    3. OS version: 14
    4. Android Studio version: 2024.1.1
    5. How widespread is the issue. Percentage of devices affected: 100%, I'm testing on galaxy s23.
  2. Debug logs that reproduce the issue: Not relevant.
  3. Steps to reproduce: Launch the app and try to display DebugRevenueCatBottomSheet in any way (Compose).

Additional context My app uses androidx.compose.material:material, not material3. But adding material3 doesn't change anything.

From my libs.versions.toml

composeBom = "2024.10.01"

compose-bom = { group = "androidx.compose", name = "compose-bom", version.ref = "composeBom" }

compose-runtime = { module = "androidx.compose.runtime:runtime" } compose-ui = { module = "androidx.compose.ui:ui" } compose-foundation = { module = "androidx.compose.foundation:foundation" } compose-animation = { module = "androidx.compose.animation:animation" } compose-ui-tooling = { module = "androidx.compose.ui:ui-tooling" } compose-ui-tooling-preview = { module = "androidx.compose.ui:ui-tooling-preview" } compose-material = { module = "androidx.compose.material:material" } compose-material-icons = { module = "androidx.compose.material:material-icons-extended" }

RCGitBot commented 2 weeks ago

👀 We've just linked this issue to our internal tracker and notified the team. Thank you for reporting, we're checking this out!