v6.4.1
This Android plugin has been made with Kotlin.
For a long time, this plugin has been developed in Java.
However, with 2025 just around the corner, and with the Stripe SDK being developed in Kotlin, new feature development required us to revisit the code in Java. Additionally, with the release of Kotlin 2.0 this year, the language has become faster and safer to use.
As a result, this plugin has been reborn in Kotlin. Instead of using Kotlin in just some parts of the code, we have unified everything under Kotlin 🎉
Trouble Shooting
Error: Unable to get provider androidx.startup.InitializationProvider
Unable to get provider androidx.startup.InitializationProvider: androidx.startup.StartupException: androidx.startup.StartupException: java.lang.NoClassDefFoundError: Failed resolution of: Landroidx/lifecycle/ReportFragment$ActivityInitializationListener;
If you got this error message at Android Studio, you should add next block to android/app/build.gradle
like https://github.com/capacitor-community/stripe/blob/main/demo/angular/android/app/build.gradle#L61-L74
+ buildscript {
+ ext.kotlin_version = '2.0.+'
+ repositories {
+ google()
+ mavenCentral()
+ }
+ dependencies {
+ classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
+ }
+ }
+ apply plugin: 'kotlin-android'