sqlite实现中的xamarin.forms中的FileNotFoundException

Jan*_*nak 4 sqlite xamarin.forms

在我使用sqlite的项目中,我收到此错误.

类型例外 System.IO.FileNotFoundException occurred in SQLite.Net.Platform.WindowsPhone8.DLL but was not handled in user code

这是一个截图.

在此输入图像描述

PS我在变量路径中得到的值为C:\ Data\Users\DefApps\AppData {F8267584-1051-4816-8195-EE018BA5155E}\local\Student.db3

谢谢

Kru*_*lur 6

你错过了Windows Phone的Sqlite.iOS和Android都有Sqlite"内置",这意味着它可以直接在平台上使用.Windows Phone没有Sqlite.

要添加它,首先使用Visual Studio中的工具 - >扩展和更新来准备开发计算机.在线搜索"sqlite windows phone".您必须为WP8安装一个(而不是8.1).完成后,您的计算机已准备好使用WP项目部署Sqlite.

Sqlite扩展

接下来,向您的WP应用程序添加对Sqlite的引用.右键单击WP项目中的引用.选择Add references,然后在菜单中选择Windows Phone SDK - > Extensions并选择Sqlite for Windows Phone.

参考Sqlite