2

我有项目源代码和 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

PS:这个项目中使用了一些库

帮我解决这个问题。

谢谢

4

1 回答 1

1

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

org > pjsip > pjsua2 > ...文件必须在这里...

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

导入 org.pjsip.pjsua2.*;

于 2015-11-26T11:51:40.613 回答