Xamarin SQLite 数据库连接问题

问题描述

我正在尝试将我的 xamarin 应用程序与 sqlite 连接,一切似乎都很好,但在 App.xaml.cs 中我收到以下错误System.NullReferenceException:'对象引用未设置为对象。'

这是我的 App.xaml.cs 页面的样子:

using System;
using TestAppDemo.Services;
using Xamarin.Forms;
using Xamarin.Forms.Xaml;

namespace TestAppDemo
{
    public partial class App : Application
    {
        public App()
        {
            InitializeComponent();
            DependencyService.Get<Isqlite>().GetConnectionWithCreateDatabase();
            MainPage = new NavigationPage(new MainPage());
        }

        protected override void OnStart()
        {
        }

        protected override void OnSleep()
        {
        }

        protected override void OnResume()
        {
        }
    }
}

有人可以帮忙吗?我需要向您提供更多信息吗?

谢谢!

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)