From f15306e0831692b8cb48467cb1ea7e22a0e0243b Mon Sep 17 00:00:00 2001 From: poka Date: Mon, 15 Nov 2021 02:28:15 +0100 Subject: [PATCH] Fix: crash when try to open camera on Android 6 --- android/app/build.gradle | 3 +++ android/app/proguard-rules.pro | 7 +++++++ pubspec.yaml | 2 +- 3 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 android/app/proguard-rules.pro diff --git a/android/app/build.gradle b/android/app/build.gradle index c892da8..a1989bf 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -66,6 +66,9 @@ android { // TODO: Add your own signing config for the release build. // Signing with the debug keys for now, so `flutter run --release` works. signingConfig signingConfigs.debug + useProguard true + + proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } } } diff --git a/android/app/proguard-rules.pro b/android/app/proguard-rules.pro new file mode 100644 index 0000000..3df0b1b --- /dev/null +++ b/android/app/proguard-rules.pro @@ -0,0 +1,7 @@ +-ignorewarnings +-keep class * { + public private *; +} +-dontwarn org.xmlpull.v1.XmlPullParser +-dontwarn org.xmlpull.v1.XmlSerializer +-keep class org.xmlpull.v1.* {*;} \ No newline at end of file diff --git a/pubspec.yaml b/pubspec.yaml index 92f56f5..d40ce04 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -5,7 +5,7 @@ description: Pay with G1. # pub.dev using `pub publish`. This is preferred for private packages. publish_to: 'none' # Remove this line if you wish to publish to pub.dev -version: 0.0.2+8 +version: 0.0.2+9 environment: sdk: ">=2.7.0 <3.0.0"