Skip to content

Commit d682fea

Browse files
committed
add android.enableR8.fullMode=false to handle #1909
1 parent 9c2e704 commit d682fea

File tree

4 files changed

+10
-8
lines changed

4 files changed

+10
-8
lines changed

README.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -60,16 +60,17 @@ This plugin requires several changes to be able to work on Android devices. Plea
6060
-dontwarn com.stripe.android.pushProvisioning.PushProvisioningActivityStarter
6161
-dontwarn com.stripe.android.pushProvisioning.PushProvisioningEphemeralKeyProvider
6262
```
63-
8. Rebuild the app, as the above changes don't update with hot reload
63+
8. Add the following line to your `gradle.properties` file: [example](https://github.com/flutter-stripe/flutter_stripe/blob/master/example/android/gradle.properties)
64+
```properties
65+
android.enableR8.fullMode=false
66+
```
67+
This will prevent crashes with the Stripe SDK on Android (see [issue](https://github.com/flutter-stripe/flutter_stripe/issues/1909)).
68+
9. Rebuild the app, as the above changes don't update with hot reload
6469

6570
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
6671

6772
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.
6873

69-
##### Issue with latest Android plugin
70-
71-
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.
72-
7374
#### iOS
7475

7576
Compatible with apps targeting iOS 13 or above.

example/android/gradle.properties

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
org.gradle.jvmargs=-Xmx1536M
22
android.useAndroidX=true
33
android.enableJetifier=true
4+
android.enableR8.fullMode=false
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#Mon Nov 13 19:26:48 WET 2023
22
distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
4-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
4+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-bin.zip
55
zipStoreBase=GRADLE_USER_HOME
66
zipStorePath=wrapper/dists

example/android/settings.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ pluginManagement {
1818

1919
plugins {
2020
id "dev.flutter.flutter-plugin-loader" version "1.0.0"
21-
id "com.android.application" version "7.3.0" apply false
21+
id "com.android.application" version "8.7.3" apply false
2222
id "org.jetbrains.kotlin.android" version "1.8.10" apply false
2323
}
2424

25-
include ":app"
25+
include ":app"

0 commit comments

Comments
 (0)