Not able to perform peer to peer sync

Hi there,

I am trying to implement peer to peer sync using this guide https://docs.couchbase.com/couchbase-lite/2.6/java.html#peer-to-peer-sync for android device but as I could see the methods do not have complete code mentioned in there. I am new to couchbase and therefore clueless as to how to implement this.

I also tried to clone and run the android app mentioned in this blog How to use Sync Gateway and Peer-to-Peer sync on Android with github link https://github.com/couchbaselabs/mini-hacks/tree/master/android-rating-app/android but am unable to run it.

It is giving me the following error in android studio.

10-07 11:38:01.976 4557-4557/? I/hbase.ratingap: Not late-enabling -Xcheck:jni (already on)
10-07 11:38:02.873 4557-4557/com.couchbase.ratingapp W/hbase.ratingap: Unexpected CPU variant for X86 using defaults: x86
10-07 11:38:03.967 4557-4557/com.couchbase.ratingapp I/hbase.ratingap: The ClassLoaderContext is a special shared library.
10-07 11:38:06.810 4557-4557/com.couchbase.ratingapp W/linker: Warning: library “/system/lib/libsqlite.so” (“/system/lib/libsqlite.so”) needed or dlopened by “/data/app/com.couchbase.ratingapp-Du-U1cXX1H62AEKO-t9q7Q==/lib/x86/libcom_couchbase_touchdb_TDCollateJSON.so” is not accessible by namespace “classloader-namespace” and will not work when the app moves to API level 24 or later (https://android.googlesource.com/platform/bionic/+/master/private-api-enforced-for-api-level-24) (allowing for now because this app’s target API level is still 22)
10-07 11:38:06.822 4557-4557/com.couchbase.ratingapp W/hbase.ratingap: Accessing hidden field Landroid/database/sqlite/SQLiteDatabase;->mThreadSession:Ljava/lang/ThreadLocal; (light greylist, JNI)
10-07 11:38:06.823 4557-4557/com.couchbase.ratingapp W/hbase.ratingap: Accessing hidden field Landroid/database/sqlite/SQLiteSession;->mConnectionPool:Landroid/database/sqlite/SQLiteConnectionPool; (dark greylist, JNI)
10-07 11:38:06.823 4557-4557/com.couchbase.ratingapp W/hbase.ratingap: Accessing hidden field Landroid/database/sqlite/SQLiteConnectionPool;->mAvailablePrimaryConnection:Landroid/database/sqlite/SQLiteConnection; (dark greylist, JNI)
10-07 11:38:06.823 4557-4557/com.couchbase.ratingapp W/hbase.ratingap: Accessing hidden field Landroid/database/sqlite/SQLiteConnection;->mConnectionPtr:J (dark greylist, JNI)
10-07 11:38:06.823 4557-4557/com.couchbase.ratingapp V/TDCollateJSON: SQLite3 handle is -464342528

                                                                  --------- beginning of crash

10-07 11:38:06.823 4557-4557/com.couchbase.ratingapp A/libc: Fatal signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x0 in tid 4557 (hbase.ratingapp), pid 4557 (hbase.ratingapp)

I am not sure how to proceed with this peer to peer implementation. Please guide me.

Please guide me!!!

Is there any peer-leader concept as well 'cause I couldn’t find any documentation on it and just came across peer-peer sync. If yes, is that a part of Enterprise edition as well?

Also, I wanted to know if couchbase lite creates any database folder in mobile wherein it stores data locally? If yes, what is the path that I can use to reach it through my mobile.