尝试使用领域时,Xamarin中的领域System.EntryPointNotfoundException [英] realm in Xamarin, System.EntryPointNotfoundException when trying to use realm

查看:59
本文介绍了尝试使用领域时,Xamarin中的领域System.EntryPointNotfoundException的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经在Xamarin应用程序中安装了realm,当我尝试使用对象(计数,写入等)时,它给了我System.EntryPointNotFoundException.

I have installed realm in a Xamarin app and when I try to use an object (count, write, etc) it gives me a System.EntryPointNotFoundException.

下面的代码:

_realm = Realm.GetInstance();
_realm.Write(() =>
            {
                var myConfig = _realm.CreateObject<Config>();
                myConfig.Email = "";
                myConfig.User = "";
            });

System.EntryPointNotFoundException:shared_realm_begin_transaction 位于(包装器托管到本机)Realms.NativeSharedRealm:begin_transaction(Realms.SharedRealmHandle) 在Realms.Transaction..ctor(Realms.SharedRealmHandle sharedRealmHandle)中的[0x0000d]在:0中 在Realms.Realm.BeginWrite()[0x00000]中的位置:: 0 在Realms.Realm.Write(System.Action动作)中的[0x00000]中:: 0 在/Users/luis/Projects/rasoApp/rasoApp/viewModels/ConfigViewModel.cs:22中的rasoApp.ConfigViewModel..ctor()[0x00025] 在/Users/luis/Projects/rasoApp/rasoApp/views/ConfigPage.xaml.cs:13中的rasoApp.ConfigPage.SetBinding(Xamarin.Forms.BindableProperty targetProperty,Xamarin.Forms.BindingBase绑定)[0x0000e] 在/Users/luis/Projects/rasoApp/rasoApp/views/HomePage.xaml.cs:18中的rasoApp.HomePage.btnOpenConfig(System.Object sender,System.EventArgs e)[0x00007] 在Xamarin.Forms.Button.Xamarin.Forms.IButtonController.SendClicked()中:0中的[0x00020] 在Xamarin.Forms.Platform.iOS.ButtonRenderer.OnButtonTouchUpInside(System.Object sender,System.EventArgs eventArgs)[0x0000e],在:0中 在/Users/builder/data/lanes/3412/3cf8aaed/source/maccore/src/UIKit/UIControl.cs:38中的UIKit.UIControlEventProxy.Activated()[0x00007]中 在(包装器托管到本机)UIKit.UIApplication:UIApplicationMain(int,string [],intptr,intptr) 在/Users/builder/data/lanes/3412/3cf8aaed/source/maccore/src/UIKit/UIApplication.cs:79中的UIKit.UIApplication.Main(System.String [] args,IntPtr主体,IntPtr委托)[0x00005] 在/Users/builder/data/lanes/3412/3cf8aaed/source/maccore/src/UIKit/UIApplication中的UIKit.UIApplication.Main(System.String [] args,System.StringPrincipalClassName,System.String proxyClassName)[0x00038] .cs:63 在/Users/luis/Projects/rasoApp/iOS/Main.cs:17

System.EntryPointNotFoundException: shared_realm_begin_transaction at at (wrapper managed-to-native) Realms.NativeSharedRealm:begin_transaction (Realms.SharedRealmHandle) at Realms.Transaction..ctor (Realms.SharedRealmHandle sharedRealmHandle) [0x0000d] in :0 at Realms.Realm.BeginWrite () [0x00000] in :0 at Realms.Realm.Write (System.Action action) [0x00000] in :0 at rasoApp.ConfigViewModel..ctor () [0x00025] in /Users/luis/Projects/rasoApp/rasoApp/viewModels/ConfigViewModel.cs:22 at rasoApp.ConfigPage.SetBinding (Xamarin.Forms.BindableProperty targetProperty, Xamarin.Forms.BindingBase binding) [0x0000e] in /Users/luis/Projects/rasoApp/rasoApp/views/ConfigPage.xaml.cs:13 at rasoApp.HomePage.btnOpenConfig (System.Object sender, System.EventArgs e) [0x00007] in /Users/luis/Projects/rasoApp/rasoApp/views/HomePage.xaml.cs:18 at Xamarin.Forms.Button.Xamarin.Forms.IButtonController.SendClicked () [0x00020] in :0 at Xamarin.Forms.Platform.iOS.ButtonRenderer.OnButtonTouchUpInside (System.Object sender, System.EventArgs eventArgs) [0x0000e] in :0 at UIKit.UIControlEventProxy.Activated () [0x00007] in /Users/builder/data/lanes/3412/3cf8aaed/source/maccore/src/UIKit/UIControl.cs:38 at at (wrapper managed-to-native) UIKit.UIApplication:UIApplicationMain (int,string[],intptr,intptr) at UIKit.UIApplication.Main (System.String[] args, IntPtr principal, IntPtr delegate) [0x00005] in /Users/builder/data/lanes/3412/3cf8aaed/source/maccore/src/UIKit/UIApplication.cs:79 at UIKit.UIApplication.Main (System.String[] args, System.String principalClassName, System.String delegateClassName) [0x00038] in /Users/builder/data/lanes/3412/3cf8aaed/source/maccore/src/UIKit/UIApplication.cs:63 at rasoApp.iOS.Application.Main (System.String[] args) [0x00008] in /Users/luis/Projects/rasoApp/iOS/Main.cs:17

推荐答案

恭喜一个有趣的问题!

我看到了类似的错误,但是在最近的工作中,我,当我生成错误的IL代码时正在细化代码生成.我们之前没有记录任何问题,也没有发现关于EntryPointNotFoundException消息的任何讨论.

I have seen a similar error but only in recent work I was doing refining code generation, when I generated bad IL code. We have no previous issues recorded nor any discussions of EntryPointNotFoundException messages that I can find.

如果您尝试从领域源下载构建我们的示例之一,例如QuickJournal可以吗?

If you try building one of our examples from the Realm source download, such as QuickJournal does that work?

如果您可以将完整的项目来演示该问题,请发送到help@realm.io,这可能是找出正在发生的事情的最快方法.

If you can send a full project demonstrating the problem to help@realm.io that is probably the fastest way to work out what is happening.

更新2016-07-11 看着另一个SO问题让我想到了更多尝试的方法:

Update 2016-07-11 Looking at another SO question made me think of a few more things to try:

  • 这是否在所有平台上都发生?

    -您是否在Xamarin Studio中启用了完全链接?

  • Does this happen on all platforms?

    - Do you have Full Linking enabled in Xamarin studio?

较早的建议

您的应用是否具有包含该逻辑的PCL?

Does your app have a PCL containing that logic?

您是否将Realm NuGet安装到主应用程序(IOS或Android)项目中?这是必要的步骤.主要的Realm库仅包含在NuGet添加到IOS或Android项目中的特定于平台的dll中.

Did you also install the Realm NuGet into the main application (IOS or Android) projects? That is a necessary step. The main Realm libraries are only included with the platform-specific dlls which NuGet adds to IOS or Android projects.

这篇关于尝试使用领域时,Xamarin中的领域System.EntryPointNotfoundException的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆