hal*_*9k2 3 sqlite azure azure-mobile-services win-universal-app xamarin.forms
我正在尝试使用Azure Mobile SQLiteStore包为UWP Xamarin.Forms编写应用程序.
我厌恶SQLitePCL包,这是上面提到的包的依赖.
在我的UWP项目中,我引用了通用Windows平台的扩展SQLite,它也依赖于Microsoft.VCLibs
错误是:无法加载DLL的'sqlite3.dll':找不到指定的模块.(来自HRESULT的异常:0x8007007E)
Android应用程序运行正常,只有UWP有这个问题,一旦它开始调用SQLite就会崩溃应用程序.
和Stacktrace:
at SQLitePCL.SQLiteConnection.SetTemporaryDirectory()
at SQLitePCL.SQLiteConnection..ctor(String fileName, SQLiteOpen openFlag, Boolean setTemporaryDirectory)
at Microsoft.WindowsAzure.MobileServices.SQLiteStore.MobileServiceSQLiteStore..ctor(String fileName)
at WellDoneIt.Services.WellDoneItMobileService.d__7.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.GetResult()
at WellDoneIt.Services.WellDoneItMobileService.d__8.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
at WellDoneIt.ViewModel.ListViewModel.d__4.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.GetResult()
at WellDoneIt.ViewModel.ListViewModel.<<-ctor>b__2_2>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.AsyncMethodBuilderCore.<>c.b__6_0(Object state)
at System.Threading.WinRTSynchronizationContext.Invoker.InvokeCore()
Run Code Online (Sandbox Code Playgroud)
谁知道如何解决这个问题?
更新:我还检查了处理器架构,对于仿真器,它设置为x86,对于真正的Win10移动设备,它设置为ARM.
两者都得到完全相同的问题.但是,当我在本地计算机上运行我的应用程序(我开发的Windows 10操作系统)时,一切正常.
提前致谢.
您需要为Windows平台添加SQLite引用.
在您的UWP项目上,转到添加引用.
转到通用Windows>扩展
然后确保勾选SQLite for Universal App Platform
| 归档时间: |
|
| 查看次数: |
2369 次 |
| 最近记录: |