What is Android Debug symbol and how to configure that in Flutter app

5.7k views Asked by At

I am trying to release an Android app for the first time on play.google.com using an app bundle. The app is implemented in Android Studio using Flutter SDK and the bundle is generated using the following command:

flutter build appbundle

When I upload the bundle to Google Play Console, I get the following warning:

This App Bundle contains native code, and you've not uploaded debug symbols.
We recommend you upload a symbol file to make your crashes and ANRs easier to
analyze and debug. This App Bundle contains native code, and you've not uploaded
debug symbols. We recommend you upload a symbol file to make your crashes and 
ANRs easier to analyze and debug.

I observe lots of people raised similar issues, but I'mnot able to figure out the exact reason for this issue and how to solve this.

enter image description here

Update:

By modifying root_app_dir/android/app/build.gradel as follows

buildTypes {
        release {
            signingConfig signingConfigs.release
            ndk {
                debugSymbolLevel 'FULL'
            }
        }
    }

Started giving me the following error:

* What went wrong:                                                      
Execution failed for task ':app:extractReleaseNativeDebugMetadata'.     
> NDK is not installed     
2

There are 2 answers

2
Moaid ALRazhy On BEST ANSWER

it is duplicate here go for the answer that says "If talking about Flutter..."

however you don't have to worry about it too much it is just warning and I've uploaded multiple flutter apps with same warning and it works just fine.

0
Roslan Amir On

After some trials and errors, I finally managed to get the Flutter build command to include the debug symbols files.

In android\local.properties make sure you add the path to the NDK. Here's mine (for Windows):

sdk.dir=C:\\Users\\Roslan\\AppData\\Local\\Android\\sdk
ndk.dir=C:\\Users\\Roslan\\AppData\\Local\\Android\\sdk\\ndk\\25.1.8937393

In android\app\build.gradle have the following:

buildTypes {
  release {
    signingConfig signingConfigs.release
    ndk {
      debugSymbolLevel 'FULL'
    }
  }
}