Android: Library not found: /native/linux/armv7l/libCouchbaseLiteJavaForestDB.so

#1

In my gradle script I have:
dependencies { compile fileTree(dir: 'libs', include: ['*.jar']) testCompile 'junit:junit:4.12' compile 'com.android.support:appcompat-v7:23.4.0' compile 'com.android.support:design:23.4.0' //compile 'com.couchbase.lite:couchbase-lite-android:1.2.1' //compile 'com.couchbase.lite:couchbase-lite-java-forestdb:1.2.1' compile 'com.couchbase.lite:couchbase-lite-android:+' compile 'com.couchbase.lite:couchbase-lite-java-forestdb:+' compile 'com.android.support:support-v4:23.4.0' compile 'com.android.support:recyclerview-v7:23.4.0' }
[After setting Manager to use ForestDB on NEW db,] When deploying apk to a hardware device on Android 4.2, I get:
System.err: Library not found: /native/linux/armv7l/libCouchbaseLiteJavaForestDB.so System.err: Error loading library: CouchbaseLiteJavaForestDB System.err: java.lang.NullPointerException System.err: at com.couchbase.lite.util.NativeLibUtils.loadLibrary(NativeLibUtils.java:44) System.err: at com.couchbase.lite.store.ForestDBStore.<clinit>(ForestDBStore.java:69) System.err: at java.lang.Class.classForName(Native Method) System.err: at java.lang.Class.forName(Class.java:217) System.err: at java.lang.Class.forName(Class.java:172) System.err: at com.couchbase.lite.Database.createStoreInstance(Database.java:1049) System.err: at com.couchbase.lite.Database.open(Database.java:1105) System.err: at com.couchbase.lite.Manager.openDatabase(Manager.java:336) System.err: at com.couchbase.lite.Manager.getDatabase(Manager.java:300) ...

Thanks,
nat

Attachments in Encrypted CBL using SQLCipher for Android
#2

@hideki Any input on this issue, please?

Thanks
nat

#3

Hi @natgross,
Thank you for reporting another issue. It seems some Android devices return armv7l as an architecture. armv7l is variation of armv7. We need to fix native library loading code to address this.
I filed the ticket: https://github.com/couchbase/couchbase-lite-java-core/issues/1328
Thanks,
Hideki

#4

Ok. Thanks. Hopefully fixed for 1.3.

#5

Hi @natgross,

it seems armv7l is armeabi device. Currently we could not compile ForestDB for armeabi and mips architectures.
ForestDB storage is only available for armeabi-v7a, x86, arm64-v8a, x86_64 and mips64 architectures.

To support old arm devices, please use SQLite storage.

Thanks!

#6

@hideki, Thanks for the comeback. The thing is I am likely to use CBL for apps I hope to put out on the Play store. I won’t have additional app versions, with and without ForestDB. I will then need to branch my code based on the device architecture. The question is; Does CBL with ForestDB have the exact same API as SQLite storage? Is it just a matter of a better db engine, or does ForestDB introduce features not available with SQLite?

Thanks;
nat

#7

Feature set is the same, it’s just faster.

#8

Thank you much.
natG