Couchbase lite 1.0.4 notworking on android version 5.0.1 lollipop


#1

I am working on Micromax AQ4501 with android version 5.0.1 lollipop, and am getting the following error on startup:

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)

I am using the 1.0.4 JAR of couchbase lite and the same APK works fine on older versions of android.

Please help us.


#2

Hi @tawheed,

It seems that Micromax AQ4501 is released with Android 4.4 (KitKat) according to http://tech.firstpost.com/product/mobile-phones/canvas-a1-aq4501-specification-367422.html . Did CBL Android v1.0.4 work fine with Micromax AQ4501 with older version of Android?

We have heard CBL Android v1.0.3 has issue with Lollipop. Recompiling CBL Android native library with latest NDK solved the issue. Recompiled native library is part of v1.0.4.

For testing purpose, can you try master branch version “0.0.0-517”? If you are using Android Studio, just need to specify “0.0.0-517” instead of “1.0.4”.

If you are using Eclipse, you can download master branch version from http://mobile.jenkins.couchbase.com/job/couchbase-lite-android-create-zip/40/

Thanks,
Hideki


#3

How often do you encounter this error: intermittently or always? It sounds like an ART bug, but could also be overly aggressive ProGuard settings.