5

My App is crashing when i add the native libraries in jniLibs, (i.e. libjingle_peerconnection_so.so ) for all architectures.

Following is stack trace extract that is causing restart crash of app.

W/System.err(11538): java.lang.ClassNotFoundException: Didn't find class "org.webrtc.DataChannel$Buffer" on path: DexPathList[[zip file "/data/app/com.sample.app-2/base.apk"],nativeLibraryDirectories=[/data/app/com.sample.app-2/lib/x86, /vendor/lib, /system/lib]]

Can anyone tell me what I am doing wrong here.?

Swaraj Pal
  • 126
  • 1
  • 8

2 Answers2

3

I finally figured out the solution, Proguard was interfering with my webrtc files. Added keep-files in proguard settings.

Swaraj Pal
  • 126
  • 1
  • 8
2

This line solved my problem. Add below line in the progaurd rule file.

-keep class org.webrtc.** { *; }
Ejaz Ahmad
  • 614
  • 5
  • 12
  • this works! reference can be found here: https://github.com/RWebRTC/WebRTC-Android-Learn/blob/master/RAppRTC/app/proguard-rules.pro – Amos Apr 29 '19 at 03:23