Skip to content

Using jniLibs.keepDebugSymbols in debug prevents Android appbundle after upgrade to 3.32 #170004

@middagj

Description

@middagj

Similar to #169195 and #169443 we could not create an app bundle after upgrading to 3.32. We got the

Release app bundle failed to strip debug symbols from native libraries. Please run flutter doctor and ensure that the Android toolchain does not report any
issues.

It took me a while of trial and error until I found out that we had:

        debug {
            packaging {
                jniLibs.keepDebugSymbols += "**/*.so"
            }
        }

and by removing it, it suddenly worked again.

Steps to recreate:

Create a new app

flutter create my_app && cd my_app

Add jniLibs.keepDebugSymbols into the debug build type

patch -p1 <<'EOD'
diff --git a/android/app/build.gradle.kts b/android/app/build.gradle.kts
--- a/android/app/build.gradle.kts
+++ b/android/app/build.gradle.kts
@@ -31,6 +31,11 @@ android {
     }
 
     buildTypes {
+        debug {
+            packaging {
+                jniLibs.keepDebugSymbols += "**/*.so"
+            }
+        }
         release {
             // TODO: Add your own signing config for the release build.
             // Signing with the debug keys for now, so `flutter run --release` works.
EOD

Create an app bundle:

flutter build appbundle

And the aforementioned error shows.

Metadata

Metadata

Assignees

Labels

Bot is counting down the days until it unassigns the issueP2Important issues not at the top of the work listc: regressionIt was better in the past than it is nowfound in release: 3.32Found to occur in 3.32found in release: 3.33Found to occur in 3.33platform-androidAndroid applications specificallyt: gradle"flutter build" and "flutter run" on Androidteam-androidOwned by Android platform teamtoolAffects the "flutter" command-line tool. See also t: labels.triaged-androidTriaged by Android platform team

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions