Friday, 27 November 2020

Use library module with JNI in application module Android library module

I have a project with 3 modules - a library and 2 apps that using this library. Now I want to add native-lib (one c file) into the library module, and use it in one of the library classes. I'm new to NDK so I followed the Google guide and created new project with NDK support and it works fine. Then I copy the cpp directory, CMakeList, and kept the correct structure of the project. Now, what happening is that the project compiles successfully, but crashes when I trying to call the native func from java class. Exception: Method threw 'java.lang.UnsatisfiedLinkError' exception.



from Use library module with JNI in application module Android library module

No comments:

Post a Comment