我正在尝试将 SightCall SDK 集成到我的 Xamarin Android 应用程序中。我创建了一个 Java 绑定库项目并创建了一个 Jars 文件夹并将 rtcc jar(Embedded Jar)放入其中,并在其中创建了一个 libs 文件夹和 armeabi、armeabi-v7a 和 x86 文件夹,每个文件夹都包含 libRtcc-6.2.1。 so(嵌入式本机库)文件。我构建了这个项目并生成了 dll。然后,我创建了一个 Android 应用程序,并将 Java Binding Library 项目的 bin\Release 文件夹中的 dll 作为参考添加到我的项目中。我试图调用集成 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
如果我缺少任何步骤以及我需要如何解决此问题,请告诉我?