livekit / client-sdk-android

LiveKit SDK for Android
https://docs.livekit.io
Apache License 2.0
165 stars 64 forks source link

UnsatisfiedLinkError:No implementation found for long org.webrtc.SoftwareVideoEncoderFactory.nativeCreateFactory() #320

Closed shoyu666 closed 8 months ago

shoyu666 commented 8 months ago

Describe the bug exception: Caused by: java.lang.UnsatisfiedLinkError: No implementation found for long org.webrtc.SoftwareVideoEncoderFactory.nativeCreateFactory() (tried Java_org_webrtc_SoftwareVideoEncoderFactory_nativeCreateFactory and Java_org_webrtc_SoftwareVideoEncoderFactory_nativeCreateFactory__)

To Reproduce Steps to reproduce the behavior:

  1. update > io.livekit:livekit-android:1.5.1

Expected behavior no exception

Screenshots If applicable, add screenshots to help explain your problem.

Device Info:

davidliu commented 8 months ago

Are you trying to instantiate a VideoEncoderFactory prior to calling LiveKit.create? This will happen if the native library isn't loaded yet.

Try calling LiveKit.init first if you need to access it prior to the create method.

davidliu commented 8 months ago

Which version were you using prior to updating to 1.5.1? Can you also provide a stack trace?

shoyu666 commented 8 months ago

thanks,call init works. ( LiveKit.Companion.init(applicationContext);)

version: 1.2.1 > 1.5.1

call stack:(java code) LiveKitOverrides overrides = new LiveKitOverrides(client, new SoftwareVideoEncoderFactory(),null, audioOptions, null); room = LiveKit.Companion.create(APP.application.getApplicationContext(), roomOptions, overrides);