diff --git a/README.md b/README.md index e77555ba..e0f37330 100644 --- a/README.md +++ b/README.md @@ -60,16 +60,17 @@ This plugin requires several changes to be able to work on Android devices. Plea -dontwarn com.stripe.android.pushProvisioning.PushProvisioningActivityStarter -dontwarn com.stripe.android.pushProvisioning.PushProvisioningEphemeralKeyProvider ``` -8. Rebuild the app, as the above changes don't update with hot reload +8. Add the following line to your `gradle.properties` file: [example](https://github.com/flutter-stripe/flutter_stripe/blob/master/example/android/gradle.properties) +```properties +android.enableR8.fullMode=false +``` +This will prevent crashes with the Stripe SDK on Android (see [issue](https://github.com/flutter-stripe/flutter_stripe/issues/1909)). +9. Rebuild the app, as the above changes don't update with hot reload These changes are needed because the Android Stripe SDK requires the use of the AppCompat theme for their UI components and the Support Fragment Manager for the Payment Sheets If you are having troubles to make this package to work on Android, join [this discussion](https://github.com/flutter-stripe/flutter_stripe/discussions/538) to get some support. -##### Issue with latest Android plugin - -We are aware of an issue with `com.android.application` plugin version 8.0.0 and above. Do not upgrade to this version as it can crash the payment sheet in release builds. See [issue](https://github.com/flutter-stripe/flutter_stripe/issues/1909) to follow the progress. - #### iOS Compatible with apps targeting iOS 13 or above. diff --git a/example/android/gradle.properties b/example/android/gradle.properties index 94adc3a3..0cfb4f04 100644 --- a/example/android/gradle.properties +++ b/example/android/gradle.properties @@ -1,3 +1,4 @@ org.gradle.jvmargs=-Xmx1536M android.useAndroidX=true android.enableJetifier=true +android.enableR8.fullMode=false diff --git a/example/android/gradle/wrapper/gradle-wrapper.properties b/example/android/gradle/wrapper/gradle-wrapper.properties index dc8c5b1b..329a822c 100644 --- a/example/android/gradle/wrapper/gradle-wrapper.properties +++ b/example/android/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ #Mon Nov 13 19:26:48 WET 2023 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/example/android/settings.gradle b/example/android/settings.gradle index 151528c4..c66670a5 100644 --- a/example/android/settings.gradle +++ b/example/android/settings.gradle @@ -18,8 +18,8 @@ pluginManagement { plugins { id "dev.flutter.flutter-plugin-loader" version "1.0.0" - id "com.android.application" version "7.3.0" apply false + id "com.android.application" version "8.7.3" apply false id "org.jetbrains.kotlin.android" version "1.8.10" apply false } -include ":app" \ No newline at end of file +include ":app"