為什我的代碼和老師的一模一樣,但老是說 Cursor 為初始化?
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.contentprovider_demo1/com.example.contentprovider_demo1.MainActivity}: java.lang.IllegalStateException: Couldn't read row 0, col -1 from CursorWindow. ?Make sure the Cursor is initialized correctly before accessing data from it.
2015-10-17
我改好了,,是int type=c1.getInt(c1.getColumnIndex(Phone.TYPE));的cursor對應錯了( ╯□╰ )
2015-10-17
我也是出現了同樣的錯誤,我用的是android Studio,如果不查詢Phone.TYPE這列就沒問題,,,,,,請問你的解決了嗎?