Note that there are some explanatory texts on larger screens.

plurals
  1. POUnsatisfiedLinkError : setMessageHandler(Native Method)
    primarykey
    data
    text
    <p>I am making an application in which I have used some native methods,and these methods are defined in a separate class. When I create the instance of that class in my Activity class then this type of error is occurs.</p> <p>This is the my Activity Class</p> <pre><code>public class LoginActivity extends Activity { PortSipSdk sdk; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.loginview); sdk = PortSipSdk.getInstance();//error is occurs at this line sdk.setOnRegisterListener(this); } } </code></pre> <p>Java class is</p> <pre><code>public class PortSipSdk { private final String TAG = "PortSipSdk"; private static PortSipSdk instance; private PortSipNetwork mNetAssist; private KeyguardLock mKeyguardLock; private Context mContext; long mSessionID = PortSipErrorcode.INVALID_SESSION_ID; public synchronized static PortSipSdk getInstance() { if (instance == null) { instance = new PortSipSdk(); } return instance; } private PortSipSdk() { msgDispatcher = new MainHandler(); setMessageHandler(msgDispatcher); videoRecorder = new PortSipVideoRecoder(); } public native void setMessageHandler(Handler msghandler); // Initialize and register functions private native int initializeSDK(int enum_transport, String agent, String STUNServer, int STUNServerPort); } </code></pre> <p>Log is</p> <pre><code>07-30 12:13:01.852: E/AndroidRuntime(651): FATAL EXCEPTION: main 07-30 12:13:01.852: E/AndroidRuntime(651): java.lang.UnsatisfiedLinkError: setMessageHandler 07-30 12:13:01.852: E/AndroidRuntime(651): at com.portsip.PortSipSdk.setMessageHandler(Native Method) 07-30 12:13:01.852: E/AndroidRuntime(651): at com.portsip.PortSipSdk.&lt;init&gt;(PortSipSdk.java:62) 07-30 12:13:01.852: E/AndroidRuntime(651): at com.portsip.PortSipSdk.getInstance(PortSipSdk.java:55) 07-30 12:13:01.852: E/AndroidRuntime(651): at com.portsip.test.LoginActivity.onCreate(LoginActivity.java:48) 07-30 12:13:01.852: E/AndroidRuntime(651): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047) 07-30 12:13:01.852: E/AndroidRuntime(651): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2627) 07-30 12:13:01.852: E/AndroidRuntime(651): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679) 07-30 12:13:01.852: E/AndroidRuntime(651): at android.app.ActivityThread.access$2300(ActivityThread.java:125) 07-30 12:13:01.852: E/AndroidRuntime(651): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033) 07-30 12:13:01.852: E/AndroidRuntime(651): at android.os.Handler.dispatchMessage(Handler.java:99) 07-30 12:13:01.852: E/AndroidRuntime(651): at android.os.Looper.loop(Looper.java:123) 07-30 12:13:01.852: E/AndroidRuntime(651): at android.app.ActivityThread.main(ActivityThread.java:4627) 07-30 12:13:01.852: E/AndroidRuntime(651): at java.lang.reflect.Method.invokeNative(Native Method) 07-30 12:13:01.852: E/AndroidRuntime(651): at java.lang.reflect.Method.invoke(Method.java:521) 07-30 12:13:01.852: E/AndroidRuntime(651): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868) 07-30 12:13:01.852: E/AndroidRuntime(651): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626) 07-30 12:13:01.852: E/AndroidRuntime(651): at dalvik.system.NativeStart.main(Native Method) </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload