したがって、基本的にDBに2回クエリを実行しています。DBをどこにも閉じていないため、このエラーが実際にどこから来ているのかわかりません。エラーを返すコードは次のように実行されます。調べてみると、私のようなケースを見たばかりです。
BeaconHandler pullAllDB = new BeaconHandler(this);
    try {
        List<Beacon> beaconsShown = pullAllDB.getAllBeacons();
        for (final Beacon bn : beaconsShown) {
            try {
                int messageCount = pullAllDB.getMessageCount();
                Log.d("Message", messageCount + " Messages Found");
                if (messageCount > 0) {
                    //Do Something
                } else {
                    // Do Nothing
                }
            } 
            catch (Exception e) {
                e.getStackTrace();
                Log.e("Message", e.getMessage());
            }
        }
    }
そして、クエリを実行するコード...
public int getBeaconsCount() {
    String countQuery = "SELECT * FROM " + TABLE_BASIC_BEACON;
    SQLiteDatabase db = this.getReadableDatabase();
    Cursor cursor = db.rawQuery(countQuery, null);
    cursor.close();
    // return count
    return cursor.getCount();
}
public int getMessageCount() {
    String mcountQuery = "SELECT * FROM " + MESSAGE_BEACON;
    SQLiteDatabase mdb = this.getReadableDatabase();
    Cursor mcursor = mdb.rawQuery(mcountQuery, null);
    mcursor.close();
    // return count
    return mcursor.getCount();
}