I have created .so file using android NDK. In xxx.java class I added some native methods to call from c/c++ files. these native methods I am calling in my own methods for example like below,
static
{
System.loadLibrary("print");
}
public native String print(String pM,int len);
public native int openPrint();
The above native methods are calling in my method so that other android application developer can use as an API’s.
public static void foo(){
openPrint()
}
Is this right way ?
For this reason I created one myprint.Jar file. it includes the libprint.so file also.
I added above jar file in another application, It’s importing the class from xxx.java but whenever I tried to run the application its throwing an error saying that
FATAL Exception,
java.lang.UnsatisifiedLinkerror....
How to solve the above problem?
Thanks in advance
The .so file should be place in libs–>armeabi–>xxx.so folder of eclipse. then create build.properties file in eclipse and mention the path of xxx.so file by doing like this