@stripe/stripe-react-native build fails with Kotlin 1.8.0 – Incompatible with Compose Compiler 1.3.2
I'm encountering a build error when running react-native run-android after installing @stripe/stripe-react-native. The build fails due to Kotlin version incompatibility:
This version (1.3.2) of the Compose Compiler requires Kotlin version 1.7.20
but you appear to be using Kotlin version 1.8.0 which is not known to be compatible.
Please fix your configuration (or suppressKotlinVersionCompatibilityCheck but don't say I didn't warn you!).
The error originates from the task:
:stripe_stripe-react-native:compileDebugKotlin FAILED Environment:
React Native version: 0.73.x
Kotlin version: 1.8.0
Android Gradle Plugin: 8.1.1
@stripe/stripe-react-native: latest version (at time of posting)
compileSdkVersion: 35
Expected Behavior: I expect the package to compile without needing to downgrade Kotlin or suppress compatibility checks manually.
Steps to Reproduce:
Install @stripe/stripe-react-native in a new RN 0.73+ project
Run npx react-native run-android
Build fails due to incompatible Compose Compiler and Kotlin versions
Temporary Workarounds Tried:
Downgrading Kotlin to 1.7.20 (not ideal since other packages may require 1.8.0)
Adding suppressKotlinVersionCompatibilityCheck (not a clean solution)
I thought I was going crazy. This has been happening to me for the past hour. Thanks for the temporary solution.
same issue, same env, but cannot bypass by workaround solution
Hey @PandorasBoxTool2024, can you try to solution listed here and see if that resolves your issue?
Hey @PandorasBoxTool2024, can you try to solution listed here and see if that resolves your issue?
I had same issue and that solution worked for me, thanks!
@justynpollard1 Is not working :-(
@justynpollard1 Is not working :-(
Have you tried deleting your gradle cache folders, and gradlew clean?
I encountered the same issue. After spending many hours debugging, I resolved it by downgrading the Stripe SDK version to 0.39.0. That fixed the problem for me.
I encountered the same issue. After several hours of debugging, I resolved it by upgrading to the latest Stripe SDK (0.47.1) and updating my Kotlin version to 2.0.21 (previously it was 1.9.25). My React Native version is 0.76.7.
@justynpollard1 Is not working :-(
Have you tried deleting your gradle cache folders, and gradlew clean?
Yes i try Downgrade and Upgrade all and try /android gradlew clean
Hi, I’m running into a build error related to Jetpack Compose Compiler and Kotlin compatibility:
e: This version (1.2.0) of the Compose Compiler requires Kotlin version 1.7.0 but you appear to be using Kotlin version 1.8.10 which is not known to be compatible. Please fix your configuration (or `suppressKotlinVersionCompatibilityCheck` but don't say I didn't warn you!).
It seems like the Stripe SDK might be using an older version of the Compose Compiler (1.2.0), which isn’t compatible with my current Kotlin version (1.8.10). Has anyone else run into this, or is there a recommended way to resolve this without downgrading Kotlin? "@stripe/stripe-react-native": "0.47.1",
Its still an issue even with the latest version of stripe. downgrading worked for me.
I encountered the same issue. After spending many hours debugging, I resolved it by downgrading the Stripe SDK version to 0.39.0. That fixed the problem for me.
Any update on this? I also am having the same issue.
Just added stripe to an Expo project that was previously compiling with 1.9.25 and ran into this error during compilation, which brought me here.
Hey @PandorasBoxTool2024, can you try to solution listed here and see if that resolves your issue?
Doing the above fix at first did not fix the problem
I deleted android/, node_modules/ and my lock file (pnpm-lock.yaml) then ran pnpm i followed by expo run:android and everything now compiles.
i have tried downgrade the kotlin, clear android all files and every step mentioned above i am using cli but still can't find a solution for this. Any one can please help
I encountered the same issue. After spending many hours debugging, I resolved it by downgrading the Stripe SDK version to 0.39.0. That fixed the problem for me.
This worked for me, I had spent hour debugging.
I encountered the same issue. After spending many hours debugging, I resolved it by downgrading the Stripe SDK version to 0.39.0. That fixed the problem for me.
Works, thanks you.