Library not found due to targetSdkVersion (armeabi-v7a and libcryptopp.so)

I created a sample project that uses Crypto ++ native C ++ Libraries and NDK to generate some ECDH key pairs. You can find the project here .

This project works great on most Android devices (works on multiple 4.4 and 5.0 devices). However, I recently launched an application on Nexus 5 and Nexus 7, running Android 6.0.1, and the application crashed with the following error.

java.lang.UnsatisfiedLinkError: dlopen failed: library "./obj/local/armeabi-v7a/libcryptopp.so" not found

I'm not quite sure what is going on here, since the project obviously has these files, and everything should be in order. This seems to be some kind of NDK related issue, but I'm not sure.

I tried to delete the armeabi-v7a folder, which caused the application to use armeabi files on Nexus devices, but they also could not find these files.

I opened apk and all the correct .so files are there with the corresponding folders.

Not sure if this is an Android Marshmallow problem, a Nexus architecture problem, or a .so compilation problem. I am new to using NDK, so I will be grateful for ideas on where to look to fix this.

EDIT . Looking at it, looks a bit more like this is an Android Marshmallow problem. A related issue has been mentioned here . Changing my to “fixes” the crash. But, obviously, this is not a very convenient future. targetSdkVersion 22

-, Android Marshmallow OpenSSL BoringSSL. , , , Crypto ++ OpenSSL ?

- , targetSdkVersion 23. , , , .

EDIT 2: Crypto ++ OpenSSL, . - .

+4

Source: https://habr.com/ru/post/1625175/


All Articles