获取java.lang.ExceptionInInitializerError和java.lang.UnsatisfiedLinkError

时间:2013-01-12 07:54:31

标签: android unsatisfiedlinkerror

我有项目源以及apk文件。如果我在模拟器上直接安装APK,那么它的工作正常,但在从eclipse运行应用程序时,我遇到了以下错误。

01-12 07:45:42.918: E/AndroidRuntime(889): FATAL EXCEPTION: main
01-12 07:45:42.918: E/AndroidRuntime(889): java.lang.ExceptionInInitializerError
01-12 07:45:42.918: E/AndroidRuntime(889):  at com.ims.IMSClientActivity.<init>(IMSClientActivity.java:64)
01-12 07:45:42.918: E/AndroidRuntime(889):  at java.lang.Class.newInstanceImpl(Native Method)
01-12 07:45:42.918: E/AndroidRuntime(889):  at java.lang.Class.newInstance(Class.java:1409)
01-12 07:45:42.918: E/AndroidRuntime(889):  at android.app.Instrumentation.newActivity(Instrumentation.java:1021)
01-12 07:45:42.918: E/AndroidRuntime(889):  at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1561)
01-12 07:45:42.918: E/AndroidRuntime(889):  at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1663)
01-12 07:45:42.918: E/AndroidRuntime(889):  at android.app.ActivityThread.access$1500(ActivityThread.java:117)
01-12 07:45:42.918: E/AndroidRuntime(889):  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:931)
01-12 07:45:42.918: E/AndroidRuntime(889):  at android.os.Handler.dispatchMessage(Handler.java:99)
01-12 07:45:42.918: E/AndroidRuntime(889):  at android.os.Looper.loop(Looper.java:123)
01-12 07:45:42.918: E/AndroidRuntime(889):  at android.app.ActivityThread.main(ActivityThread.java:3683)
01-12 07:45:42.918: E/AndroidRuntime(889):  at java.lang.reflect.Method.invokeNative(Native Method)
01-12 07:45:42.918: E/AndroidRuntime(889):  at java.lang.reflect.Method.invoke(Method.java:507)
01-12 07:45:42.918: E/AndroidRuntime(889):  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
01-12 07:45:42.918: E/AndroidRuntime(889):  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
01-12 07:45:42.918: E/AndroidRuntime(889):  at dalvik.system.NativeStart.main(Native Method)
01-12 07:45:42.918: E/AndroidRuntime(889): Caused by: java.lang.ExceptionInInitializerError
01-12 07:45:42.918: E/AndroidRuntime(889):  at com.Aloha.tinyWRAP.ProxyVideoProducer.registerPlugin(ProxyVideoProducer.java:65)
01-12 07:45:42.918: E/AndroidRuntime(889):  at com.Aloha.ngn.NgnEngine.initialize(NgnEngine.java:67)
01-12 07:45:42.918: E/AndroidRuntime(889):  at com.ims.Engine.<clinit>(Engine.java:37)
01-12 07:45:42.918: E/AndroidRuntime(889):  ... 16 more
01-12 07:45:42.918: E/AndroidRuntime(889): Caused by: java.lang.UnsatisfiedLinkError: swig_module_init
01-12 07:45:42.918: E/AndroidRuntime(889):  at com.Aloha.tinyWRAP.tinyWRAPJNI.swig_module_init(Native Method)
01-12 07:45:42.918: E/AndroidRuntime(889):  at com.Aloha.tinyWRAP.tinyWRAPJNI.<clinit>(tinyWRAPJNI.java:679)
01-12 07:45:42.918: E/AndroidRuntime(889):  ... 19 more

P.S:在这个项目中使用了一些库

帮我解决这个问题。

由于

1 个答案:

答案 0 :(得分:1)

您的 pjsua2JNI.java - 文件位于错误的命名空间/目录中。您必须在Java源代码的根目录下提供它,具有以下结构:

org&gt; pjsip&gt; pjsua2&gt; ...文件必须在这里......

不要忘记在您的应用程序代码中导入该包:

import org.pjsip.pjsua2。*;