天天看點

Xamarin.Android 使用 SQLite 出現 Couldn't read row 0, col -1 from CursorWindow. 異常

異常:Java.Lang.IllegalStateException: Couldn't read row 0, col -1 from CursorWindow.  Make sure the Cursor is initialized correctly before accessing data from it.

Xamarin.Android 使用 SQLite 出現 Couldn't read row 0, col -1 from CursorWindow. 異常

出現該問題一般分為兩種情況:

1.請求的字段不在表中,可能是大小寫沒寫對。(我就是Id寫成id出現的錯誤)

Xamarin.Android 使用 SQLite 出現 Couldn't read row 0, col -1 from CursorWindow. 異常
Xamarin.Android 使用 SQLite 出現 Couldn't read row 0, col -1 from CursorWindow. 異常

2.字段類型不比對。

繼續閱讀