From 72bcb964b3918582ffec3672f53757030223ffba Mon Sep 17 00:00:00 2001 From: BSchindeleAnother Date: Tue, 28 Oct 2025 13:38:03 +0100 Subject: [PATCH] docs: Add Android release build troubleshooting section Added troubleshooting guide for common android release build issues due to missing proguard rules. --- README.md | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/README.md b/README.md index 7d2b9c63..25f51a15 100644 --- a/README.md +++ b/README.md @@ -75,6 +75,33 @@ dependencies: ffmpeg_kit_flutter_new: ^4.1.0 ``` +#### 2.1 Set proguard rules for Android release build + +To work without errors for android release builds, you have to add up the following exception to your proguard rules. This will even be necessary if you deactivated shrinking/minification, as obfusciation is automatically applied by flutter for android release builds. + +**Step 1: Create/Update ProGuard Rules** + +``` +# Add this line in {PROJECT}/android/app/proguard-rules.pro +-keep class com.antonkarpenko.ffmpegkit.** { *; } +``` + +**Step 2: Enable ProGuard in Build Configuration** + +Make sure proguard rule is properly setup in {PROJECT}/android/app/build.gradle. + +``` +android { + buildTypes { + release { + {... existing lines ...} + minifyEnabled true + shrinkResources true + proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' + } + } +} +``` ### 3. Packages