0
基本上我有這樣的:光標#的getType()是指數越界
Cursor cur = ...
for (int i = 0; i < cur.getColumnCount(); i++) {
String name = cur.getColumnName(i);
Log.d("dao",name);
int type = cur.getType(i);
...並在getType()
通話以上時出現例外。 列名稱記錄正確。
錯誤AndroidRuntime產生的原因: android.database.CursorIndexOutOfBoundsException:指數-1要求, 大小爲0
可能重複的[cursor.getType()和CursorIndexOutOfBoundsException異常](http://stackoverflow.com/questions/8133784/cursor-gettype-and-cursorindexoutofboundsexception-exception) – 2013-04-27 22:22:27