android: Debug symbols upload on Google Play Console for better crash information
When we upload an app bundle or apk, below warning is returned from google play console. Question is what kind of source symbols should we or can we upload here? I am guessing that it is it not pdb files š Is there a way for Xamarin.forms applications for android to get symbols and better crash information?
This App Bundle contains native code, and you've not uploaded debug symbols. We recommend that you upload a symbol file to make your crashes and ANRs easier to analyse and debug.

About this issue
- Original URL
- State: closed
- Created 6 years ago
- Reactions: 3
- Comments: 27 (17 by maintainers)
Commits related to this issue
- [Xamarin.Android.Build.Tasks] Add Support for bundletool meta-data Context #5378 Provide a default value for `AndroidProguardMappingFile` when using `AndroidLinkTool=r8`. Add support for providing ... — committed to dellis1972/xamarin-android by dellis1972 5 years ago
- [Xamarin.Android.Build.Tasks] Add Support for bundletool meta-data Context #5378 Provide a default value for `AndroidProguardMappingFile` when using `AndroidLinkTool=r8`. Add support for providing ... — committed to dellis1972/xamarin-android by dellis1972 5 years ago
- [Xamarin.Android.Build.Tasks] Add Support for bundletool meta-data Context #5378 Provide a default value for `AndroidProguardMappingFile` when using `AndroidLinkTool=r8`. Add support for providing ... — committed to dellis1972/xamarin-android by dellis1972 5 years ago
- [Xamarin.Android.Build.Tasks] Add Support for bundletool meta-data Context #5378 Add a new property `AndroidCreateProguardMappingFile` to control the creation of the proguard mapping file. This will... — committed to dellis1972/xamarin-android by dellis1972 5 years ago
- [Xamarin.Android.Build.Tasks] Add Support for bundletool meta-data Context #5378 Add a new property `AndroidCreateProguardMappingFile` to control the creation of the proguard mapping file. This will... — committed to dellis1972/xamarin-android by dellis1972 5 years ago
- [Xamarin.Android.Build.Tasks] Add Support for bundletool meta-data Context #5378 Add a new property `AndroidCreateProguardMappingFile` to control the creation of the proguard mapping file. This will... — committed to dellis1972/xamarin-android by dellis1972 5 years ago
- [Xamarin.Android.Build.Tasks] Add Support for bundletool meta-data Context #5378 Add a new property `AndroidCreateProguardMappingFile` to control the creation of the proguard mapping file. This will... — committed to dellis1972/xamarin-android by dellis1972 5 years ago
- [Xamarin.Android.Build.Tasks] Add Support for bundletool meta-data Fixes: https://github.com/xamarin/xamarin-android/issues/5378 Context: 2dab2bc3725a3ca3d56c6767c60f0eecf6426f46 When uploading an ... — committed to dellis1972/xamarin-android by dellis1972 5 years ago
- [Xamarin.Android.Build.Tasks] Add Support for bundletool meta-data (#6616) Fixes: https://github.com/xamarin/xamarin-android/issues/5378 Context: 2dab2bc3725a3ca3d56c6767c60f0eecf6426f46 When u... — committed to dotnet/android by dellis1972 5 years ago
@lauxjpn this code https://github.com/xamarin/xamarin-android/pull/6616/files#diff-72a69a14e7fbd5d8f65dce108bf7a0eca31fbbffaea6332ee4232ca020298b3dR27 will always make sure that the
mapping.txtfile ends up in thepublishfolder. It will also be auto included in the.aabas well.@lauxjpn can you send a PR for the
dotnet publishissue? We donāt really have a spec on what itās supposed to do ā we took a guess and copied the.aaband.apkfiles.Seems like you could add that
mapping.txtfile to@(_AndroidFilesToPublish)here:https://github.com/xamarin/xamarin-android/blob/f93d3d810279e7fad87063043fcc2c38b5c25bee/src/Xamarin.Android.Build.Tasks/Microsoft.Android.Sdk/targets/Microsoft.Android.Sdk.Publish.targets#L22-L30
@plaili ok looks like our Task which is responsible for calling the
build-bundlecommand onbundletooldoes not support additional arguments. It seems that the--metadata-fileargument has been added recently.The
AndroidBundleToolExtraArgsis only used when we callbuild-apks. So we are going to need to add this feature. Iāll take a. look, we will probably add aAndroidBundleMetaDataFileItemGroup which might look likeIāll talk this over with @jonathanpeppers and see if we can come up with an easy way to handle this.
@lauxjpn you should be able to use
$(OutputPath)if you set your property after this line:It seems like we should maybe set
$(AndroidProguardMappingFile)by default ā so you donāt have to do this at all?The
AndroidProguardMappingFileonly works withr8/d8. It should output the mapping if those are set.VS 2019 16.7.x does not include the fix from #5304 since it was released before the fix was merged. You will need to be on 16.9.x. Also PR #5318 made it an āopt-inā feature. Which means you need to set the following in your release config in the csproj in order to activate it.
This was solved for obfuscated Java/Kotlin code here:
https://github.com/xamarin/xamarin-android/pull/5304
It doesnāt look like we have solved this for native code, which would include AOTād .NET assemblies.