android-studiofluttergoogle-play

Playstore error: App Bundle contains native code, and you've not uploaded debug symbols


When I want to release a new flutter app bundle to the Playstore. I get this error: "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 can't find any way to fix this. I'm new with flutter and releasing app's and getting a bit desperate... Any help would be fantastic.

When I add "android.defaultConfig.ndk.debugSymbolLevel = 'FULL'" (on line 1) to the app/build.gradle as suggested in https://developer.android.com/studio/preview/features#native-crash-symbolization. I get This error in the Android studio terminal. I use this command "flutter build appbundle".

Error in Terminal: FAILURE: Build failed with an exception.

Could not get unknown property 'android' for project ':app' of type org.gradle.api.Project.

BUILD FAILED in 3s Running Gradle task 'bundleRelease'... Running Gradle task 'bundleRelease'... Done 4,3s Gradle task bundleRelease failed with exit code 1


Solution

  • Before you can upload debug symbols files, you must be using Android Gradle plugin version 4.1 or higher.

    Looks like it will come only with Android Studio 4.1, because I can only get Gradle 4.0.0 automatically now.

    So I suggest you to return classic Play console and it will let you through :)

    UPDATE: So just use an updated Gradle and add NDK debug symbols to the build now