I am trying to integrate this specific library into my Android project, and the library is written in C / C ++. I miraculously got ndk-build to give me the necessary .so file.
However, looking at it, there is a sample in the project, and they use the mysterious .jar with API bindings to .c / c++ files.
How can I
- create this special
.jar file with .so based API?
OR
- directly add a method to the main
c++ file and then call it from Java?
I tried to override things using JNI, but it doesn't seem to work. I keep getting UnsatisfiedLinkError .
Throughout the documentation on the Internet, jni is used as a textbook. I am pleased with just a few links to JNA tutorials.
c ++ android android-ndk jni jna
David T. May 12 '15 at 12:35 a.m. 2015-05-12 00:35
source share