После попытки инициализации рендерера выдается следующее исключение.Средство предварительного просмотра форм Xamarin вчера работало некоторое время, однако, когда я загрузил решение сегодня, я столкнулся с этими ошибками.
Я загрузил пакет NuGet sqlite-net-pcl (последняя версия) для проекта Android.
Я должен быть администратором, чтобы быть совсем новым с Xamarin и SQLite, и изо всех сил пытаться найти правильное решение даже после того, какчасы гуглят ...
Мои ссылки в проекте Android
![enter image description here](https://i.stack.imgur.com/obLe0.png)
Исключение:
Failed to process message Load
mono.android.DesignerException: System.TypeInitializationException: The type initializer for 'SQLite.SQLiteConnection' threw an exception. ---> System.DllNotFoundException: e_sqlite3
at mono.android.DesignerException.fromThrowable(DesignerException.java:54)
at mono.android.DesignerSession.checkRenderResultForError(DesignerSession.java:235)
at mono.android.DesignerSession.load(DesignerSession.java:314)
at mono.android.DesignerSession.processMessage(DesignerSession.java:675)
at mono.android.MessageListener.executeMessage(MessageListener.java:88)
at mono.android.MessageListener$Runner.run(MessageListener.java:44)
at java.lang.Thread.run(Thread.java:748)
Caused by: android.runtime.JavaProxyThrowable: System.TypeInitializationException: The type initializer for 'SQLite.SQLiteConnection' threw an exception. ---> System.DllNotFoundException: e_sqlite3
at (wrapper managed-to-native) SQLitePCL.SQLite3Provider_e_sqlite3+NativeMethods.sqlite3_libversion_number()
at SQLitePCL.SQLite3Provider_e_sqlite3.SQLitePCL.ISQLite3Provider.sqlite3_libversion_number () [0x00000] in <18970a0afc7f4ff79ddf6a2303a8754b>:0
at SQLitePCL.raw.SetProvider (SQLitePCL.ISQLite3Provider imp) [0x00008] in <6c81c50555334bedbd88534becf30d81>:0
at SQLitePCL.Batteries_V2.Init () [0x00005] in <089e75ea5306497b83b6e1606896c7dd>:0
at SQLite.SQLiteConnection..cctor () [0x00010] in <eaa146ee868043e287f5507c8701ad9e>:0
--- End of inner exception stack trace ---
at (wrapper managed-to-native) System.Object.__icall_wrapper_mono_generic_class_init(intptr)
at Artsfiske1.MainPage.OnAppearing () [0x00008] in C:\Users\Magnus\source\repos\Artsfiske1\Artsfiske1\Artsfiske1\MainPage.xaml.cs:21
at Xamarin.Forms.Page.SendAppearing () [0x00024] in D:\a\1\s\Xamarin.Forms.Core\Page.cs:311
at Xamarin.Forms.Platform.Android.PageRenderer.OnAttachedToWindow () [0x00027] in D:\a\1\s\Xamarin.Forms.Platform.Android\Renderers\PageRenderer.cs:42
at Android.Views.View.n_OnAttachedToWindow (System.IntPtr jnienv, System.IntPtr native__this) [0x00009] in <a10f61e70eeb434e952fef884856c199>:0
at (wrapper dynamic-method) System.Object.11(intptr,intptr)
at md51558244f76c53b6aeda52c8a337f2c37.PageRenderer.n_onAttachedToWindow(Native Method)
at md51558244f76c53b6aeda52c8a337f2c37.PageRenderer.onAttachedToWindow(PageRenderer.java:55)
at android.view.View.dispatchAttachedToWindow(View.java:17445)
at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:3326)
at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:3333)
at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:3333)
at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:3333)
at android.view.AttachInfo_Accessor.setAttachInfo(AttachInfo_Accessor.java:42)
at com.android.layoutlib.bridge.impl.RenderSessionImpl.inflate(RenderSessionImpl.java:334)
at com.android.layoutlib.bridge.Bridge.createSession(Bridge.java:384)
at com.android.tools.idea.layoutlib.LayoutLibrary.createSession(LayoutLibrary.java:270)
at mono.android.DesignerSession.load(DesignerSession.java:307)
... 4 more
РЕДАКТИРОВАТЬ: Я считаю, что нашел решение.Для этого решения необходимо настроить сборку проекта x64 или x86 в Configuration Manager.
Как добавить x64 (или любой процессор) в качестве опции сборки в Visual Studio 2010 (из консольного приложения в библиотеку классов)
ИЗМЕНИТЬ СНОВА Работает как постоянное исправление.Работает только временно после перестройки решения ....