Reputation: 8927
I have a Xamarin.Forms Android app that runs reliably in debug build but crashes immediately, on startup, in release build.
My dev environment comprises of a Windows 10 PC with Visual Studio 2019, which is USB connected to the Android 9.0 device that I am testing against.
I have attempted to narrow down the cause of the issue by editing the Visual Studio release build configuration, one setting at a time, until it matches the working debug configuration. However, even with the release build config identical to the debug build config, the crash still occurs. Does this mean that Visual Studio is applying some other release build settings, apart from those configurable in the UI?
Is there any way to access diagnostic information from this crash? Any other suggestions how to identify the cause?
I am happy to post more details of the project configuration and development environment, if it helps.
Update: As suggested by several posters, I have retrieved the logcat data for the crash, but I am not sure how to interpret it, or where to go next:
Upvotes: 2
Views: 2089
Reputation: 51
Check the Device Log. It should contain Unhandled Exception Info for your App. See here: View->Other Windows->Device Log - it is the Logcat's log, just in built-in to VisualStudio window. Tip1: Open it before running your App, and choose your device in top-left. Tip2: Watch the log immediately after the crash (better copy-it, paste into an editor), because it is overwhelmed by messages very quickly.
Upvotes: 3