java.lang.unsatisfiedlinkerror. where to add .so file in eclipse for android application

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

Answer:1

The libprint.so needs to be put in the libs folder, and then loaded using:

System.loadLibrary("print");

May be you have java.lang.UnsatisfiedLinkError because, the c function name didn’t match the fully qualified name of your java class.
i suggest to follow this link: http://mindtherobot.com/blog/452/android-beginners-ndk-setup-step-by-step/

Answer:2

I am using selenium webdriver with Firefox . driver.navigate().back(); I browse through pages and when I navigate back through page , I get following exception.In Browser it says Document expired. ...

This is my code for my android app which isn't complete package com.example; import android.app.Activity; import android.os.Bundle; import android.view.View; import android.widget.EditText; import ...

Based on post type i need to push item to observable list. So in case when if closure is not used (for example post.type != SomeType) my observable list is empty. So due to that im receiving ...

I am planning to architect a centralized logging system for one of our project which has multiple components written in Java , Python & Scala. I want to collect logs from different components ( ...