更新到 Android L 后,我遇到了这样的错误,尽管之前(在 Android 4.4 Nexus 7 2013 上)一切都很好:
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)
尝试创建数据库后发生异常:
manager = new Manager(new AndroidContext(appContext),
Manager.DEFAULT_OPTIONS);
Database db = manager.getDatabase("db_name"); // exception here
有谁知道如何解决它?