Skip to content

[BUG]Uable to lunch SDK on Android #15

Open

Description

@gbbest15

Describe the bug
I was unable to lunch the app on Android, it always crashing the app..

To Reproduce
Steps to reproduce the behavior:

  1. initialize and Lunch the Sdk
  2. java.lang.NoSuchMethodError: No static method rememberModalBottomSheetState...
    in class Landroidx/compose/material3/ModalBottomSheet_androidKt
WhatsApp.Video.2025-12-01.at.15.39.21.mp4

Smartphone (please complete the following information):

  • Device: Android
  • Version': >=3.5.0 <4.0.0'

Additional context
Add any other context about the problem here.

Activity

  1. disparta commented on Jan 6, 2026

    @disparta

    Hello,

    Please add the following snippet to your android/app/proguard-rules.pro file

    # --- Keep annotation + inner class attributes ---
    -keepattributes Annotation, InnerClasses, Signature
    # --- Kotlinx Serialization ---
    -dontnote kotlinx.serialization.AnnotationsKt
    -keepclassmembers class kotlinx.serialization.json.** {
        *** Companion;
    }
    -keepclasseswithmembers class kotlinx.serialization.json.** {
        kotlinx.serialization.KSerializer serializer(...);
    }
    # --- Kotlin Standard + kotlinx packages ---
    -keep class kotlin.** { *; }
    -keep class kotlinx.** { *; }
    -keepclassmembers class **$WhenMappings {
        *;
    }
    -keepclassmembers class kotlin.Metadata {
        public *;
    }
    # --- Parcelable Support ---
    -keep class * implements android.os.Parcelable {
        public static final android.os.Parcelable$Creator *;
    }
    -keepnames class * implements android.os.Parcelable {
        public static final ** CREATOR;
    }
    -keepclassmembers class * implements android.os.Parcelable {
        public static final android.os.Parcelable$Creator *;
    }
    # --- Retrofit (Square or standard Retrofit2) ---
    -keep interface retrofit2.Call
    -keep class retrofit2.** { *; }
    -keep interface retrofit2.* { *; }
    # Keep Retrofit annotations
    -keepclasseswithmembers class * {
        @retrofit2.http.* <methods>;
    }
    # --- Retrofit – Square package (optional but safe) ---
    -keep class com.squareup.retrofit2.** { *; }
    -keep interface com.squareup.retrofit2.* { *; }
    # --- Paystack SDK ---
    -keep class com.paystack.android.core.api.** { *; }
    -keep interface com.paystack.android.core.api.* { *; }
    -keep class com.paystack.android.core.api.models.* { *; }
    # Already defined above, but safe to repeat (R8 ignores duplicates)
    -keepattributes Annotation
    
  2. Tolulope05 commented on Feb 26, 2026

    @Tolulope05

    I am facing this same issue. Has there been no solution?

  3. disparta commented on Feb 26, 2026

    @disparta

    @Tolulope05 If you have added the proguard snippet, make sure to add it to the build types

    buildTypes {
            release {
                signingConfig signingConfigs.release
                shrinkResources false
                proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'),
                           'proguard-rules.pro'
            }
            debug {
                proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'),
                           'proguard-rules.pro'
            }
        }
    
  4. Tolulope05 commented on Feb 26, 2026

    @Tolulope05

    D/ActivityThread(25803): ++ activityComponent:com.liveetlcc.liveet.dev/com.paystack.android.ui.paymentsheet.PaymentSheetActivity counts:1 ALEAK_CLEAR_SUPPORT:true
    D/ViewRootImpl(25803): setView appearance:0 com.liveetlcc.liveet.dev/com.paystack.android.ui.paymentsheet.PaymentSheetActivity
    I/tlcc.liveet.dev(25803): hiddenapi: Accessing hidden method Landroid/os/SystemProperties;->addChangeCallback(Ljava/lang/Runnable;)V (runtime_flags=0, domain=platform, api=unsupported) from Landroidx/compose/ui/platform/AndroidComposeView$Companion; (domain=app, TargetSdkVersion=36) using reflection: allowed
    D/BLASTBufferQueue(25803): VRI[PaymentSheetActivity]#2 acquireNextBufferLocked size=1080x2400 mFrameNumber=1 applyTransaction=true mTimestamp=1192810772724942(auto) mPendingTransactions.size=0 graphicBufferId=110823041138711 transform=0
    I/tlcc.liveet.dev(25803): hiddenapi: Accessing hidden method Ljava/lang/invoke/MethodHandles$Lookup;->(Ljava/lang/Class;I)V (runtime_flags=0, domain=core-platform, api=unsupported) from Lretrofit2/Platform; (domain=app, TargetSdkVersion=36) using reflection: allowed

    D/AndroidRuntime(25803): Shutting down VM
    E/AndroidRuntime(25803): FATAL EXCEPTION: main
    E/AndroidRuntime(25803): Process: com.liveetlcc.liveet.dev, PID: 25803
    E/AndroidRuntime(25803): java.lang.NoSuchMethodError: No static method AnimatedContent(Ljava/lang/Object;Landroidx/compose/ui/Modifier;Lkotlin/jvm/functions/Function1;Landroidx/compose/ui/Alignment;Ljava/lang/String;Lkotlin/jvm/functions/Function4;Landroidx/compose/runtime/Composer;II)V in class Landroidx/compose/animation/AnimatedContentKt; or its super classes (declaration of 'androidx.compose.animation.AnimatedContentKt' appears in /data/app/~~JJkJMnw6f6-jLnTwQ8Lx-w==/com.liveetlcc.liveet.dev-b_F4Q9ublRh9jRqubiuSxw==/base.apk)
    E/AndroidRuntime(25803): at com.paystack.android.ui.PaymentContainerUiKt.PaymentContainerUi(PaymentContainerUi.kt:89)
    E/AndroidRuntime(25803): at com.paystack.android.ui.paymentsheet.PaymentSheetActivity$PaymentSheetUI$2.invoke(PaymentSheetActivity.kt:84)
    E/AndroidRuntime(25803): at com.paystack.android.ui.paymentsheet.PaymentSheetActivity$PaymentSheetUI$2.invoke(PaymentSheetActivity.kt:83)
    E/AndroidRuntime(25803): at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.kt:130)
    E/AndroidRuntime(25803): at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.kt:51)
    E/AndroidRuntime(25803): at androidx.compose.material3.ModalBottomSheet_androidKt$ModalBottomSheet$2$1$5.invoke(ModalBottomSheet.android.kt:264)
    E/AndroidRuntime(25803): at androidx.compose.material3.ModalBottomSheet_androidKt$ModalBottomSheet$2$1$5.invoke(ModalBottomSheet.android.kt:221)
    E/AndroidRuntime(25803): at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.kt:121)
    E/AndroidRuntime(25803): at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.kt:51)

    This is whats shutting down my app when I launch the SDK. I have added the proguard @disparta

  5. Tolulope05 commented on Feb 26, 2026

    @Tolulope05

    Is there no support to this? @damilola-paystack @disparta @gbbest15

  6. KanmaChizea commented on Apr 19, 2026

    @KanmaChizea

    I fixed this by adding this to my build.gradle

    dependencies {
         implementation 'com.paystack.android:paystack-ui:0.0.11'
    }
    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions