Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Couchbase Lite on Android L

After updating to Android L, I got errors like this, though before (on Android 4.4 Nexus 7 2013) everything was fine:

java.lang.NoSuchFieldError: no "I" field "mConnectionPtr" in class "Landroid/database/sqlite/SQLiteConnection;" or its superclasses
        at com.couchbase.touchdb.TDCollateJSON.nativeRegisterCustomCollators(Native Method)
        at com.couchbase.touchdb.TDCollateJSON.registerCustomCollators(TDCollateJSON.java:11)
        at com.couchbase.lite.android.AndroidSQLiteStorageEngine.open(AndroidSQLiteStorageEngine.java:46)
        at com.couchbase.lite.Database.open(Database.java:909)
        at com.couchbase.lite.Manager.getDatabase(Manager.java:228)
        at com.explain.messenger.model.utils.CBHelper.init(CBHelper.java:55)

Exeption occures after trying to create database :

 manager = new Manager(new AndroidContext(appContext),
                Manager.DEFAULT_OPTIONS);
 Database db = manager.getDatabase("db_name"); // exception here

does anyone knows how to fix it ?

like image 536
Andriy Bas Avatar asked Jul 22 '14 08:07

Andriy Bas


People also ask

How do I create a local couchbase Lite database?

Getting Started Download the Xcode project. Unzip the file and install Couchbase Lite using the install script. Open Todo. xcodeproj in Xcode.

What is couchbase Lite DB?

Our self-managed NoSQL database offering. Mobile. Embedded NoSQL on your device, anywhere. Autonomous Operator.

Is couchbase Lite open source?

Couchbase Lite is an open source iOS/Android NoSQL DB with built-in sync capability.

What is couchbase mobile?

Couchbase Mobile securely syncs data from any cloud to the edge, enabling you to store, query, search, and analyze data in the cloud, at the edge, or on the device regardless of internet connectivity and speed, guaranteeing that applications are always fast and always on.


1 Answers

Problem was fixed. Use this build from master CouchBase Lite - build 463

Or just wait new version 1.0.3 to be released.

Gradle

compile 'com.couchbase.lite:couchbase-lite-android:0.0.0-463'

Maven

<dependency>
  <groupId>com.couchbase.lite</groupId>
  <artifactId>couchbase-lite-android</artifactId>
  <version>0.0.0-463</version>
</dependency>

Thanks to Tleyden

like image 70
Felipe Conde Avatar answered Oct 06 '22 03:10

Felipe Conde