我正在尝试将AppCenter Analytics集成到我的Windows IoT核心UWP应用中。在启动时,我不断收到以下错误:
[AppCenter] ERROR: Failed to configure App Center.
Microsoft.AppCenter.Storage.StorageException: Cannot initialize SQLite library. ---> System.IO.FileLoadException: Could not load file or assembly 'SQLite-net, Version=1.1.0.0, Culture=neutral, PublicKeyToken=null'. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
at Microsoft.AppCenter.Storage.StorageAdapter..ctor(String databasePath)
at Microsoft.AppCenter.Storage.Storage.DefaultAdapter()
--- End of inner exception stack trace ---
at Microsoft.AppCenter.Storage.Storage.DefaultAdapter()
at Microsoft.AppCenter.AppCenter.InstanceConfigure(String appSecretOrSecrets)
at Microsoft.AppCenter.AppCenter.PlatformStart(String appSecret, Type[] services)
我在前台应用程序和后台应用程序上都出现此错误。添加SQLite.UWP.2015 SDK参考没有帮助。添加SQLite.Net-PCL包参考没有帮助。
AppCenter分析是否适用于UWP + IoT?如果是这样的话?如果不是什么选择?
答案 0 :(得分:0)
AppCenter分析可与Windows IoT Core上的UWP配合使用。从您的错误日志中,我认为这是由于错过了相关的sqlite库或者版本与依赖于SQLite-net 1.1的其他库冲突。 AppCenter分析依赖于sqlite-net-pcl 1.3.1或更高版本。您可以尝试通过命令在Package Manager Console中安装此软件包:
Install-Package sqlite-net-pcl -Version 1.4.118
答案 1 :(得分:0)
Microsoft.AppCenter.Analytics v1.6.1与sqlite-net-pcl v1.4.118之间存在冲突。要解决此问题,请将sqlite-net-pcl降级为1.3.3。