Another boxStore is open for this directory [ObjectBox problem]

36 views Asked by At
public static BoxStore getBoxStore() {
    synchronized (TayqaSale.class) {
        if (sBoxStore == null || sBoxStore.isClosed()) {
            int flags = 0;
            sBoxStore = MyObjectBox.builder().maxSizeInKByte(3000000).maxReaders(10000)
                    .androidContext(getInstance())
                    .debugFlags(flags).build();
        }
            return sBoxStore;
    }
}

My code is like this, and sometimes when i want to run app when older version is installed it throws exception like another boxstore is still open

This is how it is intended to use boxstore but still some crashes... if i install by deleting older version and clearing back up it will work, but i want to update

0

There are 0 answers