Punith Raj
Punith Raj

Reputation: 2195

CouchBase Lite Java support to run on Android system

I am developing a plugin (Gradle java project) which should be independent to run on a PC or on Android OS architecture. Within this plugin(output : .jar file) i want to initialize database, persist documents and query for documents. The saved files will be

Later i will use this .jar file in my PC version of java project and also in Android project.

enter image description here

I have chosen "couchbase lite java" as its nosql, provides cipher security and also has server sync.

compile group: 'com.couchbase.lite', name: 'couchbase-lite-java-core', version: '1.4.0'
compile group: 'com.couchbase.lite', name: 'couchbase-lite-java', version: '1.4.0'

Now if i am running my project to create database on my desktop with Java 8 it works fine, Whereas when i run this program on android project it fails because of native support (as expected).

Process: com.bosch.bethere, PID: 24623
java.lang.UnsatisfiedLinkError: No implementation found for long com.couchbase.lite.internal.database.sqlite.SQLiteConnection.nativeOpen(java.lang.String, int, java.lang.String, boolean, boolean) (tried Java_com_couchbase_lite_internal_database_sqlite_SQLiteConnection_nativeOpen and Java_com_couchbase_lite_internal_database_sqlite_SQLiteConnection_nativeOpen__Ljava_lang_String_2ILjava_lang_String_2ZZ)
at com.couchbase.lite.internal.database.sqlite.SQLiteConnection.nativeOpen(Native Method)
at com.couchbase.lite.internal.database.sqlite.SQLiteConnection.open(SQLiteConnection.java:194)
at com.couchbase.lite.internal.database.sqlite.SQLiteConnection.open(SQLiteConnection.java:178)

IS there support from Couchbase to run on Android and PC JVM different architecture ?? is there anything i am missing?

is there any other persistence framework which solves my needs?

Upvotes: 0

Views: 258

Answers (1)

Hod
Hod

Reputation: 2286

The short answer is that, while the Java and Android APIs (for version 1.x) are nearly identical, the underlying dependencies aren't. So you'd need extra build steps when including the library to include the right extras for each platform.

Upvotes: 1

Related Questions