2013-01-12 57 views
2

我有項目源以及apk文件。如果我直接在模擬器上安裝APK,那麼它的工作正常,但從Eclipse運行應用程序時,我得到以下錯誤。獲取java.lang.ExceptionInInitializerError和java.lang.UnsatisfiedLinkError

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:有些圖書館在這個項目中使用

幫我解決這個問題。

感謝

+0

你有沒有在構建路徑中添加? –

+0

是的,我已經添加該庫在構建路徑 – juned

+0

錯誤是在這裏看到引起來自:java.lang.UnsatisfiedLinkError:swig_module_init –

回答

1

pjsua2JNI.java - 文件是在錯誤的命名空間/目錄。你必須給它在Java源代碼的根,具有以下結構:

組織> PJSIP> pjsua2> ...文件都在這裏了

不要忘了導入封裝在您的應用程序代碼中:

import org.pjsip.pjsua2。*;

相關問題