在Drangboard 410c的android开发中读取Cursor中的值问题
Uri uri;
Cursor cursor = contentResolver.query(uri, null,null,null,null);
if(cursor !=null){
String name = cursor.getString(1);//
curosr.close();
cursor =null;
}
代码如上: Caused by: android.database.CursorIndexOutOfBoundsException: Index -1 requested, with a size of 4
编译没有问题,只有在运行的时候才会发现。