Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Android] Document fix for warning "native debug symbols are missing in appbundle" when uploading app to playconsole #98773

Open
jaded0 opened this issue Feb 18, 2022 · 15 comments
Labels
a: release Challenges faced when attempting to productionize an app d: api docs Issues with https://api.flutter.dev/ P2 Important issues not at the top of the work list platform-android Android applications specifically team-android Owned by Android platform team tool Affects the "flutter" command-line tool. See also t: labels. triaged-android Triaged by Android platform team

Comments

@jaded0
Copy link

jaded0 commented Feb 18, 2022

Building my app using flutter on android studio, and when I upload my app bundle (made via flutter build appbundle, the message pops up:

Warning

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

I've tried every solution currently online to fix this. Every combination of the following:
these solutions:

Upgrading to Flutter 2.10.0
Upgrading to Android Studio Bumblebee | 2021.1.1 Patch 1 and clicking check for updates, to which it responds You already have the latest version of Android Studio and plugins installed.
Trying to check the gradle plugin version, but it's packaged into android studio, and I can't see the version nor an option to upgrade.
Upgrading Android SDK build tools to 33-rc1. via SDK manager
Installing NDK (Side-by-side) via SDK manager
Installing CMake via SDK manager
Adding ndk.dir=/home/jaden/Android/Sdk/ndk/23.1.7779620 to the local.properties file, even though that's apparently deprecated.
adding android.buildTypes.release.ndk.debugSymbolLevel = 'SYMBOL_TABLE' to the bottom of my app/build.gradle.
from app/build.gradle:

android {
    compileSdkVersion 31

    ...

    defaultConfig {
        applicationId "app.(myapp)"
        minSdkVersion 23
        targetSdkVersion 31
        versionCode flutterVersionCode.toInteger()
        versionName flutterVersionName
    }
    ndkVersion "23.1.7779620"
    buildTypes {
        ...
        release {
            signingConfig signingConfigs.release
            ndk {
                debugSymbolLevel 'SYMBOL_TABLE'
            }
        }
    }
}

flutter doctor:

flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 2.10.0, on Manjaro Linux 5.13.19-2-MANJARO, locale en_US.UTF-8)
[✓] Android toolchain - develop for Android devices (Android SDK version 31.0.0)
[✗] Chrome - develop for the web (Cannot find Chrome executable at google-chrome)
    ! Cannot find Chrome. Try setting CHROME_EXECUTABLE to a Chrome executable.
[✓] Android Studio (version 2021.1)
[!] Connected device
    ! No devices available
[✓] HTTP Host Availability

! Doctor found issues in 2 categories.
last lines of `flutter build appbundle -v`:
[        ] > Task :package_info_plus:generateReleaseBuildConfig UP-TO-DATE
[        ] > Task :package_info_plus:parseReleaseLocalResources UP-TO-DATE
[        ] > Task :package_info_plus:generateReleaseRFile UP-TO-DATE
[        ] > Task :package_info_plus:javaPreCompileRelease UP-TO-DATE
[        ] > Task :package_info_plus:compileReleaseJavaWithJavac UP-TO-DATE
[        ] > Task :package_info_plus:mergeReleaseGeneratedProguardFiles UP-TO-DATE
[        ] > Task :package_info_plus:exportReleaseConsumerProguardFiles UP-TO-DATE
[        ] > Task :fluttertoast:compileReleaseAidl NO-SOURCE
[        ] > Task :fluttertoast:generateReleaseBuildConfig UP-TO-DATE
[        ] > Task :fluttertoast:parseReleaseLocalResources UP-TO-DATE
[        ] > Task :fluttertoast:generateReleaseRFile UP-TO-DATE
[        ] > Task :fluttertoast:compileReleaseKotlin UP-TO-DATE
[        ] > Task :fluttertoast:javaPreCompileRelease UP-TO-DATE
[        ] > Task :fluttertoast:compileReleaseJavaWithJavac UP-TO-DATE
[  +97 ms] > Task :fluttertoast:mergeReleaseGeneratedProguardFiles UP-TO-DATE
[        ] > Task :fluttertoast:exportReleaseConsumerProguardFiles UP-TO-DATE
[        ] > Task :permission_handler:compileReleaseAidl NO-SOURCE
[        ] > Task :permission_handler:generateReleaseBuildConfig UP-TO-DATE
[        ] > Task :permission_handler:parseReleaseLocalResources UP-TO-DATE
[        ] > Task :permission_handler:generateReleaseRFile UP-TO-DATE
[        ] > Task :permission_handler:javaPreCompileRelease UP-TO-DATE
[        ] > Task :permission_handler:compileReleaseJavaWithJavac UP-TO-DATE
[        ] > Task :permission_handler:mergeReleaseGeneratedProguardFiles UP-TO-DATE
[        ] > Task :permission_handler:exportReleaseConsumerProguardFiles UP-TO-DATE
[        ] > Task :app:buildKotlinToolingMetadata UP-TO-DATE
[        ] > Task :app:checkReleaseDuplicateClasses UP-TO-DATE
[        ] > Task :app:compileReleaseAidl NO-SOURCE
[        ] > Task :app:generateReleaseBuildConfig UP-TO-DATE
[        ] > Task :cloud_firestore:writeReleaseAarMetadata UP-TO-DATE
[        ] > Task :file_picker:writeReleaseAarMetadata UP-TO-DATE
[        ] > Task :firebase_auth:writeReleaseAarMetadata UP-TO-DATE
[        ] > Task :firebase_core:writeReleaseAarMetadata UP-TO-DATE
[        ] > Task :flutter_fimber:writeReleaseAarMetadata UP-TO-DATE
[        ] > Task :flutter_inappwebview:writeReleaseAarMetadata UP-TO-DATE
[        ] > Task :flutter_keyboard_visibility:writeReleaseAarMetadata UP-TO-DATE
[        ] > Task :flutter_plugin_android_lifecycle:writeReleaseAarMetadata UP-TO-DATE
[        ] > Task :fluttertoast:writeReleaseAarMetadata UP-TO-DATE
[        ] > Task :image_picker:writeReleaseAarMetadata UP-TO-DATE
[        ] > Task :package_info_plus:writeReleaseAarMetadata UP-TO-DATE
[        ] > Task :path_provider_android:writeReleaseAarMetadata UP-TO-DATE
[        ] > Task :permission_handler:writeReleaseAarMetadata UP-TO-DATE
[        ] > Task :share_plus:writeReleaseAarMetadata UP-TO-DATE
[        ] > Task :shared_preferences_android:writeReleaseAarMetadata UP-TO-DATE
[        ] > Task :url_launcher_android:writeReleaseAarMetadata UP-TO-DATE
[        ] > Task :webview_flutter_android:writeReleaseAarMetadata UP-TO-DATE
[        ] > Task :app:checkReleaseAarMetadata UP-TO-DATE
[ +495 ms] > Task :app:copyFlutterAssetsRelease
[        ] > Task :app:processReleaseManifestForPackage UP-TO-DATE
[        ] > Task :app:processReleaseResources UP-TO-DATE
[        ] > Task :cloud_firestore:bundleLibCompileToJarRelease UP-TO-DATE
[        ] > Task :file_picker:bundleLibCompileToJarRelease UP-TO-DATE
[        ] > Task :firebase_auth:bundleLibCompileToJarRelease UP-TO-DATE
[        ] > Task :flutter_fimber:bundleLibCompileToJarRelease UP-TO-DATE
[        ] > Task :flutter_inappwebview:bundleLibCompileToJarRelease UP-TO-DATE
[        ] > Task :flutter_keyboard_visibility:bundleLibCompileToJarRelease UP-TO-DATE
[        ] > Task :fluttertoast:bundleLibCompileToJarRelease UP-TO-DATE
[        ] > Task :image_picker:bundleLibCompileToJarRelease UP-TO-DATE
[        ] > Task :package_info_plus:bundleLibCompileToJarRelease UP-TO-DATE
[        ] > Task :path_provider_android:bundleLibCompileToJarRelease UP-TO-DATE
[        ] > Task :permission_handler:bundleLibCompileToJarRelease UP-TO-DATE
[        ] > Task :share_plus:bundleLibCompileToJarRelease UP-TO-DATE
[        ] > Task :shared_preferences_android:bundleLibCompileToJarRelease UP-TO-DATE
[        ] > Task :url_launcher_android:bundleLibCompileToJarRelease UP-TO-DATE
[        ] > Task :webview_flutter_android:bundleLibCompileToJarRelease UP-TO-DATE
[  +96 ms] > Task :app:compileReleaseKotlin UP-TO-DATE
[        ] > Task :app:javaPreCompileRelease UP-TO-DATE
[        ] > Task :app:compileReleaseJavaWithJavac UP-TO-DATE
[        ] > Task :app:extractProguardFiles UP-TO-DATE
[        ] > Task :app:mergeReleaseGeneratedProguardFiles UP-TO-DATE
[        ] > Task :app:processReleaseJavaRes NO-SOURCE
[        ] > Task :cloud_firestore:processReleaseJavaRes NO-SOURCE
[        ] > Task :cloud_firestore:bundleLibResRelease NO-SOURCE
[        ] > Task :file_picker:processReleaseJavaRes NO-SOURCE
[        ] > Task :file_picker:bundleLibResRelease NO-SOURCE
[        ] > Task :firebase_auth:processReleaseJavaRes NO-SOURCE
[        ] > Task :firebase_auth:bundleLibResRelease NO-SOURCE
[        ] > Task :firebase_core:processReleaseJavaRes NO-SOURCE
[        ] > Task :firebase_core:bundleLibResRelease NO-SOURCE
[        ] > Task :flutter_fimber:processReleaseJavaRes NO-SOURCE
[        ] > Task :flutter_fimber:bundleLibResRelease UP-TO-DATE
[        ] > Task :flutter_inappwebview:processReleaseJavaRes NO-SOURCE
[        ] > Task :flutter_inappwebview:bundleLibResRelease NO-SOURCE
[        ] > Task :flutter_keyboard_visibility:processReleaseJavaRes NO-SOURCE
[        ] > Task :flutter_keyboard_visibility:bundleLibResRelease NO-SOURCE
[        ] > Task :flutter_plugin_android_lifecycle:processReleaseJavaRes NO-SOURCE
[        ] > Task :flutter_plugin_android_lifecycle:bundleLibResRelease NO-SOURCE
[        ] > Task :fluttertoast:processReleaseJavaRes NO-SOURCE
[        ] > Task :fluttertoast:bundleLibResRelease UP-TO-DATE
[        ] > Task :image_picker:processReleaseJavaRes NO-SOURCE
[        ] > Task :image_picker:bundleLibResRelease NO-SOURCE
[        ] > Task :package_info_plus:processReleaseJavaRes NO-SOURCE
[        ] > Task :package_info_plus:bundleLibResRelease NO-SOURCE
[        ] > Task :path_provider_android:processReleaseJavaRes NO-SOURCE
[        ] > Task :path_provider_android:bundleLibResRelease NO-SOURCE
[        ] > Task :permission_handler:processReleaseJavaRes NO-SOURCE
[        ] > Task :permission_handler:bundleLibResRelease NO-SOURCE
[        ] > Task :share_plus:processReleaseJavaRes NO-SOURCE
[        ] > Task :share_plus:bundleLibResRelease NO-SOURCE
[        ] > Task :shared_preferences_android:processReleaseJavaRes NO-SOURCE
[        ] > Task :shared_preferences_android:bundleLibResRelease NO-SOURCE
[        ] > Task :url_launcher_android:processReleaseJavaRes NO-SOURCE
[        ] > Task :url_launcher_android:bundleLibResRelease NO-SOURCE
[        ] > Task :webview_flutter_android:processReleaseJavaRes NO-SOURCE
[        ] > Task :webview_flutter_android:bundleLibResRelease NO-SOURCE
[        ] > Task :app:mergeReleaseJavaResource UP-TO-DATE
[        ] > Task :cloud_firestore:bundleLibRuntimeToJarRelease UP-TO-DATE
[        ] > Task :file_picker:bundleLibRuntimeToJarRelease UP-TO-DATE
[        ] > Task :firebase_auth:bundleLibRuntimeToJarRelease UP-TO-DATE
[        ] > Task :firebase_core:bundleLibRuntimeToJarRelease UP-TO-DATE
[        ] > Task :flutter_fimber:bundleLibRuntimeToJarRelease UP-TO-DATE
[        ] > Task :flutter_inappwebview:bundleLibRuntimeToJarRelease UP-TO-DATE
[        ] > Task :flutter_keyboard_visibility:bundleLibRuntimeToJarRelease UP-TO-DATE
[        ] > Task :flutter_plugin_android_lifecycle:bundleLibRuntimeToJarRelease UP-TO-DATE
[        ] > Task :fluttertoast:bundleLibRuntimeToJarRelease UP-TO-DATE
[        ] > Task :image_picker:bundleLibRuntimeToJarRelease UP-TO-DATE
[        ] > Task :package_info_plus:bundleLibRuntimeToJarRelease UP-TO-DATE
[        ] > Task :path_provider_android:bundleLibRuntimeToJarRelease UP-TO-DATE
[        ] > Task :permission_handler:bundleLibRuntimeToJarRelease UP-TO-DATE
[        ] > Task :share_plus:bundleLibRuntimeToJarRelease UP-TO-DATE
[        ] > Task :shared_preferences_android:bundleLibRuntimeToJarRelease UP-TO-DATE
[        ] > Task :url_launcher_android:bundleLibRuntimeToJarRelease UP-TO-DATE
[        ] > Task :webview_flutter_android:bundleLibRuntimeToJarRelease UP-TO-DATE
[ +172 ms] > Task :app:minifyReleaseWithR8 UP-TO-DATE
[        ] > Task :app:mergeReleaseJniLibFolders UP-TO-DATE
[        ] > Task :cloud_firestore:mergeReleaseJniLibFolders UP-TO-DATE
[        ] > Task :cloud_firestore:mergeReleaseNativeLibs NO-SOURCE
[        ] > Task :cloud_firestore:copyReleaseJniLibsProjectOnly UP-TO-DATE
[        ] > Task :file_picker:mergeReleaseJniLibFolders UP-TO-DATE
[        ] > Task :file_picker:mergeReleaseNativeLibs NO-SOURCE
[        ] > Task :file_picker:copyReleaseJniLibsProjectOnly UP-TO-DATE
[        ] > Task :firebase_auth:mergeReleaseJniLibFolders UP-TO-DATE
[        ] > Task :firebase_auth:mergeReleaseNativeLibs NO-SOURCE
[        ] > Task :firebase_auth:copyReleaseJniLibsProjectOnly UP-TO-DATE
[        ] > Task :firebase_core:mergeReleaseJniLibFolders UP-TO-DATE
[        ] > Task :firebase_core:mergeReleaseNativeLibs NO-SOURCE
[        ] > Task :firebase_core:copyReleaseJniLibsProjectOnly UP-TO-DATE
[        ] > Task :flutter_fimber:mergeReleaseJniLibFolders UP-TO-DATE
[        ] > Task :flutter_fimber:mergeReleaseNativeLibs NO-SOURCE
[        ] > Task :flutter_fimber:copyReleaseJniLibsProjectOnly UP-TO-DATE
[        ] > Task :flutter_inappwebview:mergeReleaseJniLibFolders UP-TO-DATE
[        ] > Task :flutter_inappwebview:mergeReleaseNativeLibs NO-SOURCE
[        ] > Task :flutter_inappwebview:copyReleaseJniLibsProjectOnly UP-TO-DATE
[        ] > Task :flutter_keyboard_visibility:mergeReleaseJniLibFolders UP-TO-DATE
[        ] > Task :flutter_keyboard_visibility:mergeReleaseNativeLibs NO-SOURCE
[        ] > Task :flutter_keyboard_visibility:copyReleaseJniLibsProjectOnly UP-TO-DATE
[        ] > Task :flutter_plugin_android_lifecycle:mergeReleaseJniLibFolders UP-TO-DATE
[        ] > Task :flutter_plugin_android_lifecycle:mergeReleaseNativeLibs NO-SOURCE
[        ] > Task :flutter_plugin_android_lifecycle:copyReleaseJniLibsProjectOnly UP-TO-DATE
[        ] > Task :fluttertoast:mergeReleaseJniLibFolders UP-TO-DATE
[        ] > Task :fluttertoast:mergeReleaseNativeLibs NO-SOURCE
[        ] > Task :fluttertoast:copyReleaseJniLibsProjectOnly UP-TO-DATE
[  +16 ms] > Task :image_picker:mergeReleaseJniLibFolders UP-TO-DATE
[        ] > Task :image_picker:mergeReleaseNativeLibs NO-SOURCE
[        ] > Task :image_picker:copyReleaseJniLibsProjectOnly UP-TO-DATE
[        ] > Task :package_info_plus:mergeReleaseJniLibFolders UP-TO-DATE
[        ] > Task :package_info_plus:mergeReleaseNativeLibs NO-SOURCE
[        ] > Task :package_info_plus:copyReleaseJniLibsProjectOnly UP-TO-DATE
[        ] > Task :path_provider_android:mergeReleaseJniLibFolders UP-TO-DATE
[        ] > Task :path_provider_android:mergeReleaseNativeLibs NO-SOURCE
[        ] > Task :path_provider_android:copyReleaseJniLibsProjectOnly UP-TO-DATE
[  +98 ms] > Task :permission_handler:mergeReleaseJniLibFolders UP-TO-DATE
[        ] > Task :permission_handler:mergeReleaseNativeLibs NO-SOURCE
[        ] > Task :permission_handler:copyReleaseJniLibsProjectOnly UP-TO-DATE
[        ] > Task :share_plus:mergeReleaseJniLibFolders UP-TO-DATE
[        ] > Task :share_plus:mergeReleaseNativeLibs NO-SOURCE
[        ] > Task :share_plus:copyReleaseJniLibsProjectOnly UP-TO-DATE
[        ] > Task :shared_preferences_android:mergeReleaseJniLibFolders UP-TO-DATE
[        ] > Task :shared_preferences_android:mergeReleaseNativeLibs NO-SOURCE
[        ] > Task :shared_preferences_android:copyReleaseJniLibsProjectOnly UP-TO-DATE
[        ] > Task :url_launcher_android:mergeReleaseJniLibFolders UP-TO-DATE
[        ] > Task :url_launcher_android:mergeReleaseNativeLibs NO-SOURCE
[        ] > Task :url_launcher_android:copyReleaseJniLibsProjectOnly UP-TO-DATE
[        ] > Task :webview_flutter_android:mergeReleaseJniLibFolders UP-TO-DATE
[        ] > Task :webview_flutter_android:mergeReleaseNativeLibs NO-SOURCE
[  +98 ms] > Task :webview_flutter_android:copyReleaseJniLibsProjectOnly UP-TO-DATE
[        ] > Task :app:mergeReleaseNativeLibs UP-TO-DATE
[        ] > Task :app:stripReleaseDebugSymbols UP-TO-DATE
[+2799 ms] > Task :app:buildReleasePreBundle
[        ] > Task :cloud_firestore:prepareReleaseArtProfile UP-TO-DATE
[        ] > Task :file_picker:prepareReleaseArtProfile UP-TO-DATE
[        ] > Task :firebase_auth:prepareReleaseArtProfile UP-TO-DATE
[        ] > Task :firebase_core:prepareReleaseArtProfile UP-TO-DATE
[        ] > Task :flutter_fimber:prepareReleaseArtProfile UP-TO-DATE
[        ] > Task :flutter_inappwebview:prepareReleaseArtProfile UP-TO-DATE
[        ] > Task :flutter_keyboard_visibility:prepareReleaseArtProfile UP-TO-DATE
[        ] > Task :flutter_plugin_android_lifecycle:prepareReleaseArtProfile UP-TO-DATE
[        ] > Task :fluttertoast:prepareReleaseArtProfile UP-TO-DATE
[        ] > Task :image_picker:prepareReleaseArtProfile UP-TO-DATE
[        ] > Task :package_info_plus:prepareReleaseArtProfile UP-TO-DATE
[        ] > Task :path_provider_android:prepareReleaseArtProfile UP-TO-DATE
[        ] > Task :permission_handler:prepareReleaseArtProfile UP-TO-DATE
[        ] > Task :share_plus:prepareReleaseArtProfile UP-TO-DATE
[        ] > Task :shared_preferences_android:prepareReleaseArtProfile UP-TO-DATE
[        ] > Task :url_launcher_android:prepareReleaseArtProfile UP-TO-DATE
[        ] > Task :webview_flutter_android:prepareReleaseArtProfile UP-TO-DATE
[        ] > Task :app:mergeReleaseArtProfile UP-TO-DATE
[        ] > Task :app:compileReleaseArtProfile UP-TO-DATE
[        ] > Task :app:collectReleaseDependencies UP-TO-DATE
[        ] > Task :app:configureReleaseDependencies UP-TO-DATE
[        ] > Task :app:extractReleaseNativeSymbolTables UP-TO-DATE
[        ] > Task :app:parseReleaseIntegrityConfig UP-TO-DATE
[        ] > Task :app:writeReleaseAppMetadata UP-TO-DATE
[        ] > Task :app:validateSigningRelease UP-TO-DATE
[+3397 ms] > Task :app:packageReleaseBundle
[+4398 ms] > Task :app:shrinkBundleReleaseResources
[+5699 ms] > Task :app:signReleaseBundle
[        ] > Task :app:produceReleaseBundleIdeListingFile
[        ] > Task :app:createReleaseBundleListingFileRedirect
[        ] > Task :app:bundleRelease
[  +96 ms] Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.
[        ] You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.
[        ] See https://docs.gradle.org/7.4/userguide/command_line_interface.html#sec:command_line_warnings
[        ] BUILD SUCCESSFUL in 36s
[        ] 375 actionable tasks: 11 executed, 364 up-to-date
[ +397 ms] Running Gradle task 'bundleRelease'... (completed in 37.5s)
[  +30 ms] ✓ Built build/app/outputs/bundle/release/app-release.aab (68.2MB).
[   +5 ms] "flutter appbundle" took 39,072ms.
[ +235 ms] ensureAnalyticsSent: 224ms
[   +5 ms] Running shutdown hooks
[   +1 ms] Shutdown hooks complete
[   +3 ms] exiting with code 0

What's insane is that the flutter documentation for building and releasing an android app says absolutely nothing about including native debug symbols. That leads me to believe that for some reason, flutter should already be including them in the app bundle, but it's not. Does it have anything to do with obfuscating my code? I didn't obfuscate mine, but do I need to use the solutions described in there to pull out the native debug symbols?
Is this even supported? Should I just upload the app as-is without the feature? What am I supposed to do when I get unintelligible crash reports?

@jaded0
Copy link
Author

jaded0 commented Feb 18, 2022

I'm submitting this as a new issue, even though #60240 is very similar, because of comments to that very issue that seem to imply that Flutter is supposed to be bundling the native debug symbols without my intervention. Namely, this comment. It may have something to do with my specific project, and I'm absolutely lost as to what the problem is.

@jaded0 jaded0 changed the title Flutter does not bundle native debug symbols in appbundle native debug symbols are missing in appbundle Feb 18, 2022
@jaded0
Copy link
Author

jaded0 commented Feb 19, 2022

Turns out the problem is occurring, for some reason, due to my usage of gradle plugin 7.1.1. Changing classpath 'com.android.tools.build:gradle:7.1.1' to 'classpath 'com.android.tools.build:gradle:4.1.3'` fixes my problem. The google play console recognizes the native debug symbols within the app bundle. It's unclear why, except within the app bundle, the directory BUNDLE-METADATA contains the directories:
Using 7.1.1:

com.android.tools.build.gradle
com.android.tools.build.libraries
com.android.tools.build.obfuscation

Using 4.1.3:

com.android.tools.build.debugsymbols
com.android.tools.build.libraries
com.android.tools.build.obfuscation

I won't be closing this issue because I don't understand why it's happened this way.

@Boehrsi
Copy link
Contributor

Boehrsi commented Feb 19, 2022

I can confirm this problem. I had a project with an up and running setup including the native debug symbols.
I updated this project (new Gradle + Gradle plugin version, NDK version, new compile / build / target versions, etc.) overall to be up to date and suddenly the app bundles were built without the native debug symbols.

Data (app/build.gradle, build.gradle, gradle-wrapper.properties, Flutter doctor output)
android {
    compileSdkVersion flutter.compileSdkVersion
    ndkVersion '23.1.7779620'
    ...
    defaultConfig {
        ...
        minSdkVersion 21
        targetSdkVersion flutter.targetSdkVersion
        versionCode flutterVersionCode.toInteger()
        versionName flutterVersionName
        ndk {
            debugSymbolLevel 'SYMBOL_TABLE'
        }
    }
    ...
}

buildscript {
    ext.kotlin_version = '1.6.10'
    repositories {
        google()
        mavenCentral()
    }

    dependencies {
        classpath 'com.android.tools.build:gradle:7.1.1'
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
    }
}
#Fri Jun 23 08:50:38 CEST 2017
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-all.zip
flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, 2.10.1, on Microsoft Windows [Version 10.0.22000.493], locale de-DE)
[√] Android toolchain - develop for Android devices (Android SDK version 31.0.0)
[√] Chrome - develop for the web
[√] Visual Studio - develop for Windows (Visual Studio Community 2019 16.10.4)
[√] Android Studio (version 2020.3)
[√] Android Studio (version 2021.1)
[√] VS Code (version 1.64.2)
[√] Connected device (3 available)
[√] HTTP Host Availability

• No issues found!

@jaded0
Copy link
Author

jaded0 commented Feb 19, 2022

I've tried it with multiple versions of the android gradle plugin, and I can say that the problem occurs after android gradle plugin version 4.1.3. So my fix right now is to make android/build.gradle have:

buildscript {
    ...
    dependencies {
        classpath 'com.android.tools.build:gradle:4.1.3'
        ...
    }
}

The next version of the plugin, 4.2.0, omits the native debug files, despite this inclusion in app/build.gradle:

android {
    ...
    packagingOptions {
        dex {
            useLegacyPackaging true
        }
        jniLibs {
            useLegacyPackaging true
        }
    }
}

@maheshj01 maheshj01 added the in triage Presently being triaged by the triage team label Feb 21, 2022
@maheshj01
Copy link
Member

maheshj01 commented Feb 21, 2022

Hi @jaded0, Thanks for filing the issue. I did see that warning a week back when uploading an app to play console. Provided that you have tried a bunch of solutions from different issues and SO threads, I am labeling this issue as a lack of documentation bug.

@maheshj01 maheshj01 added a: release Challenges faced when attempting to productionize an app documentation platform-android Android applications specifically tool Affects the "flutter" command-line tool. See also t: labels. and removed in triage Presently being triaged by the triage team labels Feb 21, 2022
@maheshj01 maheshj01 changed the title native debug symbols are missing in appbundle [Android] Document fix for warning "native debug symbols are missing in appbundle" when uploading app to playconsole Feb 21, 2022
@jaded0
Copy link
Author

jaded0 commented Feb 21, 2022

It really ought to be built into flutter that it still manages to create the entire app bundle on the later versions of the android gradle plugin. I'd say it's more of a flutter or android gradle plugin bug.

@maheshj01
Copy link
Member

Okay, let us wait for the secondary triage's input on this issue.

@costacoz
Copy link

costacoz commented Jul 5, 2022

@jaded0 I've also had the same problem, but I overcame it only by using debugSymbolLevel FULL. When I used SYMBOL_TABLE it also didn't work. But with FULL the google play console immediately finds native symbols, without me even uploading a separate zip file.
The gradle version I use is: 7.2.1
The only concern I have is whether it is safe to pack debug symbols together with appbundle? As I thought it was intended to go separately to avoid de-obfuscation.

@GaryQian GaryQian added the P2 Important issues not at the top of the work list label Jul 12, 2022
@jirehcwe
Copy link

@jaded0 I've also had the same problem, but I overcame it only by using debugSymbolLevel FULL. When I used SYMBOL_TABLE it also didn't work. But with FULL the google play console immediately finds native symbols, without me even uploading a separate zip file. The gradle version I use is: 7.2.1 The only concern I have is whether it is safe to pack debug symbols together with appbundle? As I thought it was intended to go separately to avoid de-obfuscation.

This didn't work for me, but I found a workaround on this StackOverflow post
https://stackoverflow.com/a/68778908/19194522

Was able to zip the folders and the Play Console recognised the debug symbols.

@laszukdawid
Copy link

We're close to hitting 2 years on this issue. Any chance there's been some progress?

@Oluwatemilorun
Copy link

When I build my app with flutter build apk --release --obfuscate --split-debug-info=build/app/outputs/symbols I get 3 files in build/app/outputs/symbols after the build is completed;

Screenshot 2024-01-30 at 08 13 23

I zipped the 3 files and tried uploading that to playstore, but I got invalid file type

@gmackall
Copy link
Member

I left a comment on the main issue (#60240) but I think this can be solved if flutter provides an unstripped flutter.jar during the build process (basically, if the engine artifacts we provide come from a build with the --no-stripped flag). I'm going to test to make sure it doesn't lead to any situations where it might accidentally cause developers to ship apks with debug symbols to users, but short of that it should be a safe change to make

@dnfield
Copy link
Contributor

dnfield commented Feb 15, 2024

Even with an unstripped libflutter.so, gradle will by default strip the library.

It should be possible to package or upload symbols - we have them available in the cloud buckets.

@gmackall
Copy link
Member

Even with an unstripped libflutter.so, gradle will by default strip the library.

It should be possible to package or upload symbols - we have them available in the cloud buckets.

Discussion here flutter/engine#50443 (comment)

@Oluwatemilorun
Copy link

When I build my app with flutter build apk --release --obfuscate --split-debug-info=build/app/outputs/symbols I get 3 files in build/app/outputs/symbols after the build is completed;

Screenshot 2024-01-30 at 08 13 23

I zipped the 3 files and tried uploading that to playstore, but I got invalid file type

Google play console rejects the generated symbols when they are uploaded

Screenshot 2024-02-27 at 10 26 34

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a: release Challenges faced when attempting to productionize an app d: api docs Issues with https://api.flutter.dev/ P2 Important issues not at the top of the work list platform-android Android applications specifically team-android Owned by Android platform team tool Affects the "flutter" command-line tool. See also t: labels. triaged-android Triaged by Android platform team
Projects
None yet
Development

No branches or pull requests