Xamarin应用程序失败,原因是三星Galaxy设备上的EntityFrameworkCore Sqlite数据库文件访问被拒绝

时间:2017-06-28 22:12:49

标签: android sqlite xamarin entity-framework-core samsung-galaxy

我正在使用Xamarin开发一个应用程序,目前针对Android设备,但也使用Forms包来定位iOS设备。我正在使用EntityFrameworkCore和Sqlite数据库来管理应用程序数据。 我遇到的问题是在三星Galaxy设备上,此配置无法引发以下异常。不幸的是,它只发生在三星设备和其他设备上,该应用程序运行良好。 你对如何解决这个问题有任何想法吗? 非常感谢你的时间

Exception:
"SQLite Error 1294: 'unable to open database file'."

File path used: "/data/user/0/app.package.name/files/rr.db"

Stack trace:
"  at Microsoft.EntityFrameworkCore.Storage.RelationalDatabaseCreator.EnsureCreated () [0x00000] in <1ce4ae811dd94fe5a5e10e630f2f4c7a>:0 \n  at Microsoft.EntityFrameworkCore.Infrastructure.DatabaseFacade.EnsureCreated () [0x00006] in <2645c1c7345546f5b968e91de81e2b12>:0 \n  at DataAccess.DataService.Sync (Framework.Dtos.SyncDataDto data) [0x00058] in /Users/JLC/Projects/RackAndRollApp/DataAccess/DataService.cs:44 \n  at RackAndRollApp.Services.SyncService+<>c__DisplayClass4_0.<Sync>b__0 () [0x00001] in /Users/JLC/Desktop/Rack&Roll/code/svn/trunk/RackAndRollApp/RackAndRollApp/Services/SyncService.cs:34 \n  at System.Threading.Tasks.AwaitTaskContinuation.InvokeAction (System.Object state) [0x00000] in <3fd174ff54b146228c505f23cf75ce71>:0 \n  at System.Threading.ExecutionContext.RunInternal (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx) [0x00071] in <3fd174ff54b146228c505f23cf75ce71>:0 \n  at System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx) [0x00000] in <3fd174ff54b146228c505f23cf75ce71>:0 \n  at System.Threading.Tasks.AwaitTaskContinuation.RunCallback (System.Threading.ContextCallback callback, System.Object state, System.Threading.Tasks.Task& currentTask) [0x0001a] in <3fd174ff54b146228c505f23cf75ce71>:0 \n--- End of stack trace from previous location where exception was thrown ---\n  at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in <3fd174ff54b146228c505f23cf75ce71>:0 \n  at System.Threading.Tasks.AwaitTaskContinuation+<>c.<ThrowAsyncIfNecessary>b__17_0 (System.Object s) [0x00000] in <3fd174ff54b146228c505f23cf75ce71>:0 \n  at System.Threading.QueueUserWorkItemCallback.WaitCallback_Context (System.Object state) [0x00007] in <3fd174ff54b146228c505f23cf75ce71>:0 \n  at System.Threading.ExecutionContext.RunInternal (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx) [0x00071] in <3fd174ff54b146228c505f23cf75ce71>:0 \n  at System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx) [0x00000] in <3fd174ff54b146228c505f23cf75ce71>:0 \n  at System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem () [0x00021] in <3fd174ff54b146228c505f23cf75ce71>:0 \n  at System.Threading.ThreadPoolWorkQueue.Dispatch () [0x00074] in <3fd174ff54b146228c505f23cf75ce71>:0 \n  at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback () [0x00000] in <3fd174ff54b146228c505f23cf75ce71>:0 "

0 个答案:

没有答案