stripe-react-native: Execution failed for task ':stripe_stripe-react-native:compileDebugKotlin'.
Describe the bug Initialized react-native project, Installed @stripe/stripe-react-native and tried to run android, it throws an error
` FAILURE: Build failed with an exception.
- What went wrong: Execution failed for task ‘:stripe_stripe-react-native:compileDebugKotlin’.
Error while evaluating property ‘compilerOptions.jvmTarget’ of task ‘:stripe_stripe-react-native:compileDebugKotlin’. Failed to calculate the value of property ‘jvmTarget’. Unknown Kotlin JVM target: 20 `
Expected behavior The app builds successfully when using the library with fresh RN projects.
Screenshots N/A
Desktop (please complete the following information):
- Mac OS Sonoma 14.0
Smartphone (please complete the following information):
- Android emulator
Additional context
- react: 18.2.0
- react-native : 0.72.7
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Reactions: 4
- Comments: 15
After upgrade to
react-native 0.73.2withkotlinVersion 1.8.0, I’m facing the same issue “@stripe/stripe-react-native”: “^0.34.0”@nitinvarda had the same issue as you. Upgrading Kotlin version fixed the issue.
In the file
android/build.gradleI had:kotlinVersion = "1.7.0"changing it to:kotlinVersion = "1.8.0"then./gradlew cleanand./gradlew bundleReleaseand the build succeeded.Into
android/build.gradle, I just updated mykotlinVersionandkotlin_versionfrom1.6.21to1.8.0.My project is RN Cli: