How to upload symbols file to Google Play Publisher Console ?
When I was uploading the release version of image to text OCR app , Google Play Publisher Platform said: “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. Learn More”.
So I documented the creation and upload of the native debug symbols of my Android app on this video. Watch it if you prefer video content.
And I documented it in this written tutorial. Continue reading if you prefer reading.
Here are the steps to generate the symbols file and upload it.
set ndk to export the native debug symbols 🔗
In app/build.gradle
(the build.gradle of the app grade) add this code snippet if it is YAML-based:
android {
...
defaultConfig {
...
+ ndk {
+ debugSymbolLevel 'FULL'
+ }
}
}
Or this code snippet, if it is TOML-based:
android {
...
defaultConfig {
...
+ ndk {
+ debugSymbolLevel = "FULL"
+ }
}
}
After that, sync the project because you changed gradle configuration/settings.
generate the Android app bundle for the release 🔗
From the menu of Android Studio, choose “build” then click on “Generate signed app bundle or apk…” and follow the usual steps to get a built release file of your Android app as aab file.
new app release 🔗
Inside Google Play Console, create a new production release as usual. Upload the app release you generated in the previous step.
upload the native debug symbols 🔗
Open terminal, and use this command to go inside this path inside your project:
cd app/build/intermediates/merged_native_libs/release/mergeReleaseNativeLibs/out/lib
All directories and files inside this lib
directory are the native debug symbols, so, we need to compress all of them in one file called symbols.zip
using this command:
zip -r symbols.zip .
After that, use this command to open the file browser in the current working directory:
xdg-open .
note: the period or dot .
means the current working directory (cwd for short).
Inside the production release in the Google Play Console, click of the vertical three dots on the uploaded aab file.
Choose “upload native debug symbols (.zip)” then drag and drop symbols.zip
file to upload it.
Then proceed with your usual steps of releasing a new update of your Android app.
I hope you enjoyed reading this post as much as I enjoyed writing it. If you know a person who can benefit from this information, send them a link of this post. If you want to get notified about new posts, follow me on YouTube , Twitter (x) , LinkedIn , and GitHub .