Delete a database after stopping the sync not working

Hi,

I want to delete a database but so far, I cant with this error:

Cannot delete the database. Please stop all of the replicators before closing the database.

I am doing:

  replicator.stop();
 database.delete()

I am stopping it but it looks like it is deleting it before(?) it is stopped. I am totally new to Java and using cbl with android with javascript.

Recommend using 2.8.3 version of CBL Java. We have enhancements to the database delete() API which will automatically take care of closing open replicators, followed by closing of database. Sometimes, depending on the state of replication, replicators take some time to close and it’s possible that it didn’t stop as yet before delete() was invoked This is true also of Android 2.8.1 as well…