In my case (Flutter) the issue was: ERROR: R8: Missing class com.google.mlkit.vision.text.chinese.ChineseTextRecognizerOptions$Builder (referenced from: com.google.mlkit.vision.text.TextRecognizer com.google_mlkit_text_recognition.TextRecognizer.initialize(io.flutter.plugin.common.MethodCall))
The issue is fixed! I created the proguard-rules.pro file directly from Android Studio.
NOTE: the name of the file should looks "proguard-rules.pro" not like "proguard-rules.pro.txt" check how it looks in Android Studio.
Inside the ProGuard file, you need to specify which classes should be removed, like this:
-dontwarn com.google.mlkit.vision.text.chinese.** -assumenosideeffects class com.google.mlkit.vision.text.chinese.** { *; }