1

我今天似乎遇到了各种各样的问题。在签署 APK 时,我根本无法让 Sqlite-net-pcl 正常运行。调试和发布工作正常,但每次我创建 APK 的签名版本时,应用程序都会因这个问题而崩溃:-

SQLite.SQLiteException: Cannot add a PRIMARY KEY column

这是我的模型的一个例子: -

using SQLite.Net.Attributes;
using System;

namespace App.BusinessLayer.LocalObjects
{
[Preserve(AllMembers = true)]
public class LocalTip
{

public int ID { get; set; }

[PrimaryKey, Column("tipObjectId")]
public string objectId { get; set; }
public DateTime createdAt { get; set; }
public DateTime updatedAt { get; set; }
public string Title { get; set; }
public string Bet { get; set; }
public string Description { get; set; }
public string Rating { get; set; }
public string Time { get; set; }
public string Bookies { get; set; }
public string Url { get; set; }
public int Status { get; set; }
public Double Odds { get; set; }
public int Outcome { get; set; }

public LocalTip()
{
    this.objectId = " ";
    this.Title = " ";
    this.Bet = " ";
    this.Description = " ";
    this.Rating = " ";
    this.Time = " ";
    this.Bookies = " ";
    this.Url = " ";
}
}
}

有没有人见过这个?

4

0 回答 0