简体   繁体   English

sqlite-net-pcl在Windows Phone中不起作用

[英]sqlite-net-pcl does not work in Windows Phone

I followed this guide https://developer.xamarin.com/guides/xamarin-forms/working-with/databases/#PCL_WinRT , but i have problem after run app on device (on emulator WP 8.1 and android platform works fine): 我按照本指南https://developer.xamarin.com/guides/xamarin-forms/working-with/databases/#PCL_WinRT ,但我在设备上运行应用程序后出现问题(在模拟器WP 8.1和Android平台上工作正常):

 Exception thrown: 'System.DllNotFoundException' in
 SQLitePCLRaw.provider.e_sqlite3.ni.DLL Exception thrown:
 'System.TypeInitializationException' in SQLite-net.ni.DLL

屏幕参考

Can help me somebody? 可以帮帮我一个人吗?

I was at the same point as you are. 我和你一样。 You need to inlucde Visual Studio C++ 2013 Runtime package to use the SQLite-Database in WindowsPhone. 您需要使用Visual Studio C ++ 2013 Runtime包来使用WindowsPhone中的SQLite-Database。

NOTE 1: Windows 8.1 and Windows Phone 8.1 require you to include the Visual Studio C++ 2013 Runtime Package in order for SQLitePCL.raw_basic to work. 注意1:Windows 8.1和Windows Phone 8.1要求您包含Visual Studio C ++ 2013运行时包,以便SQLitePCL.raw_basic工作。

NOTE 2: Windows Phone 8 Silverlight requires you to download Precompiled Binaries for Windows Phone 8 VSIX and install in Visual Studio; 注意2:Windows Phone 8 Silverlight要求您下载Windows Phone 8 VSIX的预编译二进制文件并在Visual Studio中安装; this enables the SQLite for Windows Phone Extension that you can then add to your app. 这将启用SQLite for Windows Phone Extension,然后您可以将其添加到您的应用程序中。

You can find the above infos and a sample project (xamarin-todo-sample) on this github page . 您可以在此github页面上找到上述信息和示例项目(xamarin-todo-sample)。 This helped me to solve the problems 这有助于我解决问题

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM