2

I am learning CI/CD Workflows for Flutter apps, I have successfully set up the CI/CD for the flutter android app but it still shows the warning while submitting through CI/CD as follows:

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.

whereas it does not show any warning when I manually build the app and submit it to the play store.

Code Runner
  • 868
  • 16
  • 27

2 Answers2

1

1. Install the NDK (Side By Side)

In Android Studio, install the NDK to your Flutter Project by following these steps

  • From an open project, select Tools > Android > SDK Manager from the main menu.
  • Click the SDK Tools tab.
  • Check the box to Show Package Details and note the version number
  • Check the box next to NDK, CMake, and Android SDK Command-line Tools
  • Click Apply

Install NDK and CMake in Android SDK Manager

After the necessary files are installed, go to File > Project Structure > SDK and select the NDK version. or add this line to your ./android/app/src/build.gradle file


android {
    compileSdkVersion 30

    ndkVersion "21.1.6352462" // << Add this line with your version of the NDK

    ... 
}

See the NDK documentation here for more details on installing the NDK.

2. CodeMagic Build Settings In your Project Set up on codemagic.io make sure you're building for release then try building your app again.

Under build settings make sure you're building for release and not debug

elijahbee
  • 21
  • 3
0

It's a partial answer. I took the solution from this answer and wrote a post-build script. The script, shared below, creates the required debug symbol zip that we can upload manually. I haven't automated the distribution step so I can't say what we need to do there.

#!/usr/bin/env sh
pushd build/app/intermediates/merged_native_libs/release/out/lib
zip -r $CM_EXPORT_DIR/aab-debug-symbols.zip *
popd
Hussain
  • 174
  • 1
  • 9