java.lang.UnsatisfiedLinkError couldn't find "libLiteCoreJNI.so" when initializing CBLite

Hello.

First of all, thank you very much for your reply. I have reviewed everything he told me a couple of weeks ago on the subject.

After several tests, I couldn’t fix it. It turns out that a friend tried my project on his computer with his Xiaomi phone and it worked, but when I tried it with his mobile on my computer, he still had the same problem.

As a conclusion I draw that it is not a problem of the phone or the project, but of the computer. I used their same SDK and it didn’t work either.

Do you know the problem or can you derive someone else?

Thank you very much in advance.

Ok… that is just totally weird. I have absolutely no idea what could cause that. It sounds like something about the way the APK is packaged?? Check your versions of Studio, Gradle and the AGP? I’m sorry to say I just have no idea what could be at the root of this.

Please post something here if you find out!!!

Hello again.

Thank god I finally found the cause of the error. It was a version of the gradle plugin, which, being older, did not create the lib folder when compiling the application and generating the APK.

Thank you very much for your dedication and time, and your advice so successful.

All the best.

Thank you I tried to manually push the lib to the respective folder and seems working.
But now i am facing a following issue on some device:

Process: com.actimirror.amretaillauncher, PID: 3500
java.lang.UnsatisfiedLinkError: dlopen failed: "/system/lib/libLiteCoreJNI.so" is 64-bit instead of 32-bit

Hey @Monika
I think the message is telling you exactly what is wrong. There are four versions of libLiteCore.so in the jar file: 32 and 64 bit, for x86 and arm architectures. It seems that your device is 32 bit, and you’ve put one of the 64-bit libraries in the lib directory.

@Adrian_Solis_Melcon Nice work! Glad you found it!

Thanks for the post. Others will definitely benefit from this bit of info.

1 Like

yes, I tried pushing a 32-bit lib and it’s working. Thank you.
I was pushing the wrong lib.

Hey @Monika! Glad to hear it!