Sinch Android chatt app Bug

648 views Asked by At

I'm working on Android chat app and everything was going fine. I've managed to add users to the parse database and display users on a friends fragment.

But then came Sinch. I added the SDK to my project as instructed on their website and added a service class which I've declared in the manifest like:

<service android:name=".services.MessageService" />

inside the application tag.

However I am experiencing a fatal error. The app runs fine until I run the service.

I run the service the moment the user logs in or registers successfully, also when already logged in. I think I have an idea of what's happening.

Something to do with:

java.lang.UnsatisfiedLinkError: dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/com.landagmail.josemaria.chatapp-1/base.apk"],nativeLibraryDirectories=[/vendor/lib, /system/lib]]]

When creating the sinch client.

I think it has something to do with Android not finding some kind of library? A sinch one? (UnsatisfiedLinkError)

Any help would be greatly appreciated =) Regards, Jose Maria Landa

Here's the output:

06-14 20:30:26.052 21498-21498/com.landagmail.josemaria.chatapp E/AndroidRuntime﹕ FATAL EXCEPTION: main Process: com.landagmail.josemaria.chatapp, PID: 21498 java.lang.UnsatisfiedLinkError: dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/com.landagmail.josemaria.chatapp-1/base.apk"],nativeLibraryDirectories=[/vendor/lib, /system/lib]]] couldn't find "libsinch-android-rtc.so" at java.lang.Runtime.loadLibrary(Runtime.java:366) at java.lang.System.loadLibrary(System.java:989) at com.sinch.android.rtc.internal.client.DefaultSinchClient.(DefaultSinchClient.java:72) at com.sinch.android.rtc.internal.client.InternalSinchClientFactory.createSinchClient(InternalSinchClientFactory.java:17) at com.sinch.android.rtc.DefaultSinchClientBuilder.build(DefaultSinchClientBuilder.java:95) at com.landagmail.josemaria.chatapp.services.MessageService.startSinchClient(MessageService.java:45) at com.landagmail.josemaria.chatapp.services.MessageService.onStartCommand(MessageService.java:34) at android.app.ActivityThread.handleServiceArgs(ActivityThread.java:2893) at android.app.ActivityThread.access$2200(ActivityThread.java:147) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1394) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:135) at android.app.ActivityThread.main(ActivityThread.java:5254) at java.lang.reflect.Method.invoke(Native Method) at java.lang.reflect.Method.invoke(Method.java:372) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:898) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:693)

1

There are 1 answers

0
Jose Maria Landa On BEST ANSWER

forgot it. i solved it. the jniLbis folder was in the wrong directory. should have been in src directory not alongside libs