【发布时间】:2018-04-06 06:53:52
【问题描述】:
我正在使用 .Net Standard 在xamarin 创建一个应用程序,到目前为止,我已经在我的解决方案中安装了以下 Nuget 包
PCL/.Net 标准包
Android 软件包
最低 SDK 级别为Android 5.1,最高为Android Oreo 8.1。
当我在 Visual Studio VS2017 中运行该应用程序时,它会运行几秒钟并突然关闭并引发以下错误
04-06 02:45:11.182 6262-6262/com.org.sam A/monodroid-assembly: Could not load assembly 'System.Runtime.CompilerServices.Unsafe' during startup registration.
04-06 02:45:11.182 6262-6262/com.org.sam A/monodroid-assembly: This might be due to an invalid debug installation.
04-06 02:45:11.182 6262-6262/com.org.sam A/monodroid-assembly: A common cause is to 'adb install' the app directly instead of doing from the IDE.
我尝试多次清理解决方案并删除 bin 和 obj 文件夹,但我遇到了同样的错误。
我没有在任何地方编写任何代码,因为我只是在迁移项目,所以这个项目是空白的。
我个人认为Realm 有System.Runtime.CompilerServices 引用,因此它的创建问题。这是从 nuget 安装领域的屏幕截图
【问题讨论】:
标签: android xamarin realm .net-standard-2.0