Note that there are some explanatory texts on larger screens.

plurals
  1. POjava.lang.IllegalStateException: attempt to re-open an already-closed object: android.database.sqlite.SQLiteQuery
    primarykey
    data
    text
    <p>Hy everybody,</p> <p>I have an error and i don't know what is wrong</p> <p>Here is my error from log</p> <pre><code>java.lang.IllegalStateException: attempt to re-open an already-closed object: android.database.sqlite.SQLiteQuery (mSql = SELECT display_name, _id FROM view_data_restricted data WHERE (1) AND (data1 =? AND mimetype='vnd.android.cursor.item/group_membership' AND display_name like '%r%') ORDER BY display_name) </code></pre> <p>and here is my code </p> <pre><code>public Cursor runQuery(CharSequence constraint) { filter = nome.getText().toString(); try{ tempCurs = getContentResolver().query(ContactsContract.Groups.CONTENT_URI, new String[]{ContactsContract.Groups._ID,ContactsContract.Groups.TITLE}, ContactsContract.Groups.ACCOUNT_NAME + " =? " + " AND " + ContactsContract.Groups.TITLE + " !=? ", new String[]{accountName,nomeGrupo}, null ); if(tempCurs.moveToFirst()) do{ cursorContactosGrupos = getContentResolver().query(ContactsContract.Data.CONTENT_URI, new String[]{ContactsContract.CommonDataKinds.GroupMembership.DISPLAY_NAME, ContactsContract.CommonDataKinds.GroupMembership._ID}, ContactsContract.CommonDataKinds.GroupMembership.GROUP_ROW_ID + " =? AND " + Data.MIMETYPE + "='" + ContactsContract.CommonDataKinds.GroupMembership.CONTENT_ITEM_TYPE + "' AND " + ContactsContract.CommonDataKinds.GroupMembership.DISPLAY_NAME + " like '%" + filter + "%'" , new String[]{String.valueOf(tempCurs.getLong(0))}, ContactsContract.CommonDataKinds.GroupMembership.DISPLAY_NAME ); //Log.w(SocioEdit.class.getName(), "-&gt;" + cursorContactosGrupos.getString(cursorContactosGrupos.getColumnIndex(ContactsContract.CommonDataKinds.StructuredName.DISPLAY_NAME))); }while(tempCurs.moveToNext()); }finally{ if(cursorContactosGrupos != null &amp;&amp; tempCurs != null &amp;&amp; !cursorContactosGrupos.isClosed() &amp;&amp; !tempCurs.isClosed()){ cursorContactosGrupos.close(); tempCurs.close(); } } return cursorContactosGrupos; } }); </code></pre> <p>What I'm doing wrong?And how can fix? Thanks for help</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload