net.rtccloud.sdk.exception.RtccRuntimeException: Unable to load native library in Xamarin

224 Views Asked by At

I am trying to integrate the SightCall SDK in my Xamarin Android app. I have created a Java Binding Library Project and created a Jars folder and placed the rtcc jar (Embedded Jar) in it and created a libs folder and armeabi, armeabi-v7a and x86 folders in it, each containing the libRtcc-6.2.1.so (Embedded Native Library) file. I built this project and generated the dll. I then created an Android application and added the dll present in the bin\Release folder of the Java Binding Library project as a Reference in my project. I tried to call the methods to integrate SightCall but I'm getting a Java.Lang.ExceptionInInitializerError at the line Rtcc.Initialize (appId, context); This is the exception that I'm getting:

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

Could you please let me know if I am missing any step and how I need to fix this issue?

0

There are 0 best solutions below