简体   繁体   English

安装 Xamarin-Forms 应用程序后应用程序崩溃

[英]App crashes after installing a Xamarin-Forms app

I have 3 self-written apps on my phone.我的手机上有 3 个自己编写的应用程序。 2 written with Xamarin.Android and one written with Xamarin.Forms. 2 个用 Xamarin.Android 编写,一个用 Xamarin.Forms 编写。 But there is a big problem.但是有一个很大的问题。 It always work only 2 or 1 app depending on which of the 3 apps was installed last.它始终只能运行 2 个或 1 个应用程序,具体取决于最后安装的 3 个应用程序中的哪一个。 If one of the two Xamarin.Android apps was installed last, then both Android apps work.如果最后安装了两个 Xamarin.Android 应用之一,则这两个 Android 应用都可以运行。 The Forms App, however, crashes immediately.然而,表单应用程序立即崩溃。 Same the other way around.反过来也一样。 If the Forms app was installed last, it works fine.如果表单应用程序是最后安装的,则它可以正常工作。 The two Android apps crash immediately.这两个 Android 应用程序立即崩溃。

Is there any reason for that?有什么理由吗? Are the frameworks not compatible?框架不兼容吗?

I had the same problem trying to install the apk from Debug folder.我在尝试从 Debug 文件夹安装 apk 时遇到了同样的问题。

Steps that worked for me: - Disable "Use Shared Runtime" - In Advanced Settings, Select supported architecture对我有用的步骤: - 禁用“使用共享运行时” - 在高级设置中,选择支持的架构

Check the screenshot if not clear如果看不清楚请检查屏幕截图

在此处输入图片说明

If you are deploying a debug apk into the same device, with different Runtimes, when the apk is installed will remove the previous / override.如果您将调试 apk 部署到具有不同运行时的同一设备中,则安装 apk 时将删除以前的 / 覆盖。 So, you will need to: disable Shared Runtime, or make sure the dependencies are all the same in all the applications因此,您需要:禁用共享运行时,或确保所有应用程序中的依赖项都相同

If you are using visual studio then Check "Application output" with release on device.如果您使用的是visual studio,请检查“应用程序输出”并在设备上发布。

In Application Output you can see if any exception is causing problem..在应用程序输出中,您可以查看是否有任何异常导致问题..

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Xamarin-forms Visual Studio 2015-无法调试应用 - Xamarin-forms Visual Studio 2015 - Failing to debug app 安装/使用下载的 nuget 包的问题(在 Xamarin-Forms 中) - Issues with installing/using a downloaded nuget package (in Xamarin-Forms) 搜索文件 Xamarin-Forms - search for file Xamarin-Forms Xamarin Forms Android app crashes after creating a class object during event handler - Xamarin Forms Android app crashes after creating a class object during event handler Xamarin.Forms应用程序在设备上的MigrateAsync而非模拟器上崩溃 - Xamarin.Forms app crashes on MigrateAsync on the device but not on the emulator 在 xamarin forms 上创建自定义渲染,应用程序处于中断模式时崩溃 - creating a custom render on xamarin forms crashes with app is in break mode Xamarin.Forms App在点击Entry时崩溃,返回“NullReferenceException” - Xamarin.Forms App crashes when clicking on Entry, returns “NullReferenceException” 应用程序在发布模式下崩溃,而不是在调试模式下崩溃 - Xamarin Forms - App crashes in release mode and not in debug mode - Xamarin Forms Xamarin.Forms - 页面因 System.Reflection.TargetInvoicationException 导致应用程序崩溃 - Xamarin.Forms - Page crashes app with System.Reflection.TargetInvoicationException 更改Xamarin形式的MasterMasterPage的宽度 - Change width of Master of MasterDetailPage for android in xamarin-forms
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM