UnsatisfiedLinkError when compiling WebRtc M109+ for Android

331 views
Skip to first unread message

Mike Grabski

unread,
May 12, 2023, 6:44:43 AM5/12/23
to discuss-webrtc
Hello

After compiling any of the WebRTC releases from M109 onwards, I am facing the following exception, when trying to initialize PeerConnectionFactory:

```
java.lang.UnsatisfiedLinkError: No implementation found for long org.webrtc.SoftwareVideoDecoderFactory.nativeCreateFactory() (tried Java_org_webrtc_SoftwareVideoDecoderFactory_nativeCreateFactory and Java_org_webrtc_SoftwareVideoDecoderFactory_nativeCreateFactory__)
                                                                                                    at org.webrtc.SoftwareVideoDecoderFactory.nativeCreateFactory(Native Method)
                                                                                                    at org.webrtc.SoftwareVideoDecoderFactory.<init>(SoftwareVideoDecoderFactory.java:23)
                                                                                                    at org.webrtc.DefaultVideoDecoderFactory.<init>(DefaultVideoDecoderFactory.java:22)
```


Reverting that commit fixes the issue for all versions of WebRtc.
Tested with M109, M112 and M113. 
I looked into the buildscripts, everything seems fine...

Here are the steps I am using to build WebRtc on Ubuntu 20.04:
1. Checkout the proper branch head
2. execute gclient sync
3. execute /build/install-build-deps.sh
4. execute /tools_webrtc/android/build_aar.py

Has anyone faced a similar issue? 
Any ideas/tips to fix the issue would be highly appreciated! 

Thanks
Mike

Tomer Petel

unread,
May 1, 2024, 7:05:32 AMMay 1
to discuss-webrtc
Hi, any conclusions here? I'm getting hit by the same version 

Tomer Petel

unread,
May 1, 2024, 12:07:11 PMMay 1
to discuss-webrtc
I think I've found the issue. The crash will occur when trying to  new DefaultVideoDecoderFactory/DefaultVideoEncoderFactory before 

PeerConnectionFactory.initialize(PeerConnectionFactory.InitializationOptions.builder(context)
.setEnableInternalTracer(true)
.createInitializationOptions());

Try to construct them after and it'll probably work.
Reply all
Reply to author
Forward
0 new messages