net.rtccloud.sdk.exception.RtccRuntimeException:无法在Xamarin中加载本机库

时间:2015-08-24 11:30:01

标签: android xamarin java-binding sightcall

我正在尝试将SightCall SDK集成到我的Xamarin Android应用中。我创建了一个Java Binding Library Project并创建了一个Jars文件夹,并在其中放置了rtcc jar(Embedded Jar),并在其中创建了一个libs文件夹和armeabi,armeabi-v7a和x86文件夹,每个文件夹都包含libRtcc-6.2.1。所以(Embedded Native Library)文件。我构建了这个项目并生成了dll。然后,我创建了一个Android应用程序,并将Java绑定库项目的bin \ Release文件夹中的dll添加为项目中的Reference。我尝试调用方法来集成SightCall,但我在Java.Lang.ExceptionInInitializerError行获得了Rtcc.Initialize (appId, context); 这是我得到的例外:

Java.Lang.ExceptionInInitializerError: 
  at at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () <IL 0x00011, 0x00047>
  at Android.Runtime.JNIEnv.CallStaticVoidMethod (intptr,intptr,Android.Runtime.JValue[]) [0x00063] in /Users/builder/data/lanes/monodroid-mlion-monodroid-4.21-series/49a04b96/source/monodroid/src/Mono.Android/src/Runtime/JNIEnv.g.cs:1457
  at at Net.Rtccloud.Sdk.Rtcc.Initialize (string,Android.Content.Context) <IL 0x0006d, 0x001e3>
  at SightCalIntegrationSample.MainActivity.initialize (string,Android.Content.Context) [0x00001] in c:\Users\user\Documents\Projects\SightCalIntegrationSample\SightCalIntegrationSample\MainActivity.cs:53
  at SightCalIntegrationSample.MainActivity.OnCreate (Android.OS.Bundle) [0x00015] in c:\Users\user\Documents\Projects\SightCalIntegrationSample\SightCalIntegrationSample\MainActivity.cs:42
  at Android.App.Activity.n_OnCreate_Landroid_os_Bundle_ (intptr,intptr,intptr) [0x00011] in /Users/builder/data/lanes/monodroid-mlion-monodroid-4.21-series/49a04b96/source/monodroid/src/Mono.Android/platforms/android-21/src/generated/Android.App.Activity.cs:2380
  at at (wrapper dynamic-method) object.d67c6fda-10b4-40fc-bd75-841cbe5807f7 (intptr,intptr,intptr) <IL 0x00017, 0x0001f>
  at --- End of managed exception stack trace ---
  at java.lang.ExceptionInInitializerError
  at at net.rtccloud.sdk.Rtcc.initialize(Unknown Source)
  at at sightcalintegrationsample.MainActivity.n_onCreate(Native Method)
  at at sightcalintegrationsample.MainActivity.onCreate(MainActivity.java:30)
  at at android.app.Activity.performCreate(Activity.java:5937)
  at at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1105)
  at at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2251)
  at at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2360)
  at at android.app.ActivityThread.access$800(ActivityThread.java:144)
  at at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1278)
  at at android.os.Handler.dispatchMessage(Handler.java:102)
  at at android.os.Looper.loop(Looper.java:135)
  at at android.app.ActivityThread.main(ActivityThread.java:5221)
  at at java.lang.reflect.Method.invoke(Native Method)
  at at java.lang.reflect.Method.invoke(Method.java:372)
  at at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:899)
  at at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:694)
  at Caused by: net.rtccloud.sdk.exception.RtccRuntimeException: Unable to load native library
  at at ****.****(Unknown Source)
  at ... 16 more

如果我错过了任何步骤以及我需要如何解决这个问题,请你告诉我吗?

0 个答案:

没有答案