stripe-react-native
stripe-react-native copied to clipboard
@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)