stripe-react-native icon indicating copy to clipboard operation
stripe-react-native copied to clipboard

@stripe/stripe-react-native build fails with Kotlin 1.8.0 – Incompatible with Compose Compiler 1.3.2

Open PandorasBoxTool2024 opened this issue 11 months ago • 16 comments

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)

PandorasBoxTool2024 avatar May 18 '25 08:05 PandorasBoxTool2024

I thought I was going crazy. This has been happening to me for the past hour. Thanks for the temporary solution.

jacksangl avatar May 19 '25 01:05 jacksangl

same issue, same env, but cannot bypass by workaround solution

kelvin-pelago avatar May 22 '25 14:05 kelvin-pelago

Hey @PandorasBoxTool2024, can you try to solution listed here and see if that resolves your issue?

tjclawson-stripe avatar May 22 '25 23:05 tjclawson-stripe

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 avatar May 23 '25 18:05 justynpollard1

@justynpollard1 Is not working :-(

PandorasBoxTool2024 avatar May 24 '25 20:05 PandorasBoxTool2024

@justynpollard1 Is not working :-(

Have you tried deleting your gradle cache folders, and gradlew clean?

justynpollard1 avatar May 24 '25 20:05 justynpollard1

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.

Alishaikh31 avatar May 29 '25 17:05 Alishaikh31

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.

MuhammadTalhaTahir1 avatar Jun 02 '25 11:06 MuhammadTalhaTahir1

@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

PandorasBoxTool2024 avatar Jun 02 '25 17:06 PandorasBoxTool2024

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",

hezhengjian avatar Jun 04 '25 02:06 hezhengjian

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.

muchirasamwel avatar Jul 05 '25 19:07 muchirasamwel

Any update on this? I also am having the same issue.

canberkvarli avatar Jul 20 '25 14:07 canberkvarli

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.

myfoostrong avatar Sep 26 '25 14:09 myfoostrong

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

Saifijaved47 avatar Nov 06 '25 12:11 Saifijaved47

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.

punterbyad avatar Nov 21 '25 23:11 punterbyad

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.

muganwas avatar Nov 21 '25 23:11 muganwas