I am trying to use Couchbase in an application that is a Launcher to the device. Currently, I am trying to set this Launcher application as System-app. When the application starts it gets crashed with the following error:->
2022-01-31 10:40:19.870 2911-2911/? E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.actimirror.amretaillauncher, PID: 2911
java.lang.UnsatisfiedLinkError: dalvik.system.PathClassLoader[DexPathList[[zip file “/system/priv-app/amRetailLauncher.apk”],nativeLibraryDirectories=[/system/lib64/amRetailLauncher, /system/lib64, /vendor/lib64, /system/lib64, /vendor/lib64]]] couldn’t find “libLiteCoreJNI.so”
at java.lang.Runtime.loadLibrary0(Runtime.java:1011)
at java.lang.System.loadLibrary(System.java:1657)
at com.couchbase.lite.CouchbaseLite.init(CouchbaseLite.java:63)
at com.actimirror.amretaillauncher.AppsApplication.getDatabase(AppsApplication.kt:62)
at com.actimirror.amretaillauncher.dataservices.CouchbaseDocumentService.getDocument(CouchbaseDocumentService.kt:38)
/*****/
Code:-
fun getDatabase(): Database {
try {
CouchbaseLite.init(mInstance!!)
val dbConfig = DatabaseConfiguration()
db = Database(“AMRL”, dbConfig)
} catch (e: Exception) {
Log.d(“getDatabase”, " Exception: ${e.localizedMessage}")
}
return db!!
}
build.gradle:->
implementation ‘com.couchbase.lite:couchbase-lite-android:2.7.0’ // tried with 2.8.6 as well.
When the Launcher is used as a normal application(not as a system app) the Couchbase works perfectly.
I am trying to use Couchbase in an application that is a Launcher to the device. Currently, I am trying to set this Launcher application as System-app. When the application starts it gets crashed with the following error:-> 2022-01-31 10:40:19.870 2911-2911/? E/AndroidRuntime: FATAL EXCEPTION: main Process: com.actimirror.amretaillauncher, PID: 2911 java.lang.UnsatisfiedLinkError: dalvik.system.PathClassLoader[DexPathList[[zip file “/system/priv-app/amRetailLauncher.apk”],nativeLibraryDirectories=[/system/lib64/amRetailLauncher, /system/lib64, /vendor/lib64, /system/lib64, /vendor/lib64]]] couldn’t find “libLiteCoreJNI.so” at java.lang.Runtime.loadLibrary0(Runtime.java:1011) at java.lang.System.loadLibrary(System.java:1657) at com.couchbase.lite.CouchbaseLite.init(CouchbaseLite.java:63) at com.actimirror.amretaillauncher.AppsApplication.getDatabase(AppsApplication.kt:62) at com.actimirror.amretaillauncher.dataservices.CouchbaseDocumentService.getDocument(CouchbaseDocumentService.kt:38)
/*****/
Code:- fun getDatabase(): Database { try { CouchbaseLite.init(mInstance!!) val dbConfig = DatabaseConfiguration() db = Database(“AMRL”, dbConfig) } catch (e: Exception) { Log.d(“getDatabase”, " Exception: ${e.localizedMessage}") } return db!! } build.gradle:-> implementation ‘com.couchbase.lite:couchbase-lite-android:2.7.0’ // tried with 2.8.6 as well.
When the Launcher is used as a normal application(not as a system app) the Couchbase works perfectly.