Hi,
I have trouble loading a pre build database in couchbase 2.1.
There is sample code given: https://docs.couchbase.com/couchbase-lite/2.1/java.html#database
DatabaseConfiguration config = new DatabaseConfiguration(getApplicationContext());
ZipUtils.unzip(getAsset("replacedb/android200-sqlite.cblite2.zip"), getApplicationContext().getFilesDir());
File path = new File(getApplicationContext().getFilesDir(), "android-sqlite");
try {
Database.copy(path, "travel-sample", config);
} catch (CouchbaseLiteException e) {
Log.e(TAG, "Could not load pre-built database");
}
But the class ZipUtils can not be resolved. It seems like it does not exist in cb2, it definitely existed in cb1.4.
Futhermore I do not quite undestand what that copy method is for, it was not necessary in cb1.4. And on which file or directory is the path variable pointing?
Many thanks in advance