A whole lot of stuff
This commit is contained in:
parent
faf319322a
commit
ad850d2be6
50 changed files with 3013 additions and 213 deletions
21
android/app/proguard-rules.pro
vendored
21
android/app/proguard-rules.pro
vendored
|
|
@ -12,3 +12,24 @@
|
|||
-dontwarn com.google.mlkit.vision.text.japanese.JapaneseTextRecognizerOptions
|
||||
-dontwarn com.google.mlkit.vision.text.korean.KoreanTextRecognizerOptions$Builder
|
||||
-dontwarn com.google.mlkit.vision.text.korean.KoreanTextRecognizerOptions
|
||||
|
||||
# The -dontwarn rules above only silence build-time warnings — they don't
|
||||
# stop R8 from stripping/renaming classes the Latin recognizer actually
|
||||
# does use at runtime via reflection. Without an explicit -keep, release
|
||||
# builds installed and launched fine but every OCR attempt threw
|
||||
# "Attempt to invoke virtual method 'java.lang.Class
|
||||
# java.lang.Object.getClass()' on a null object reference" from inside the
|
||||
# ML Kit plugin, silently swallowed by receipt_capture.dart's catch block
|
||||
# and surfaced to the user as "Couldn't automatically read this receipt."
|
||||
-keep class com.google.mlkit.** { *; }
|
||||
-keep class com.google.android.gms.internal.mlkit_vision_text_common.** { *; }
|
||||
|
||||
# AndroidX WorkManager (pulled in transitively by one of the Google SDKs,
|
||||
# not used directly by this app) initializes its Room-backed WorkDatabase
|
||||
# reflectively at process startup via androidx.startup.InitializationProvider
|
||||
# — R8 was stripping/renaming those generated Room implementation classes,
|
||||
# crashing every release build before Flutter even started ("Failed to
|
||||
# create an instance of androidx.work.impl.WorkDatabase"). Keeping the
|
||||
# whole (small, self-contained) impl package is the standard fix.
|
||||
-keep class androidx.work.impl.** { *; }
|
||||
-keep class androidx.room.** { *; }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue