Xamarin App runs on debug but crashes on release

て烟熏妆下的殇ゞ 提交于 2020-04-13 06:55:12

问题


My Xamarin application works perfectly on debug mode but crashes on release mod. I get this error: "Unfortunately App has stopped". I connected my phone through USB and when I run the app in release mode I get this error.

Unfortunately I can't debug the app in release mod because I get this message in the Output window: "Android application is running (debug is disabled in android project properties)", although the "Enable developer instrumentation" box is checked. I tried all linking alternative None/SDK/SDK and User but still doesn't work.

Is there a way to see what causes the crash, in a log file or something else ?


回答1:


Make sure that Shared Mono Runtime is not selected in the release config




回答2:


Can you try the following

Solution 1: Uninstall your local app that was deployed under Debug mode manually. Deploy Release app.

Solution 2: Update your version of Xamarin

Solution 3: Project setting → Android Options → Linker → Configuration = Release; Linking = Sdk Assemblies Only




回答3:


I had the same issue today. After making several trials on configurations and build settings, the only solution that worked for me was to update all Xamarin related packages via NuGet Package Manager. You can try this next time when you encounter this kind of a situation.




回答4:


Actually, Clean the solution, uninstall the app and uninstall API working fine for me



来源:https://stackoverflow.com/questions/49649627/xamarin-app-runs-on-debug-but-crashes-on-release

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!