Couchbase Lite on Android L
Asked Answered
F

1

8

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 ?

Fregoso answered 22/7, 2014 at 8:13 Comment(1)
found this issue on GitHub : link hope they will solve it soonFregoso
B
6

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

Broadax answered 1/10, 2014 at 18:45 Comment(1)
Version released with this bug fixed !! Version 1.0.3. developer.couchbase.com/mobile/develop/references/… The bug in question is the #373 (github.com/couchbase/couchbase-lite-android/issues/373)Pantaloons

© 2022 - 2024 — McMap. All rights reserved.