aws-samples / amazon-ivs-broadcast-android-sample

MIT No Attribution
9 stars 8 forks source link

UnsatisfiedLinkError #36

Closed KunNiu closed 1 year ago

KunNiu commented 1 year ago

There is no such issue when I use version 1.7.3, the issue occured after upgrade to 1.8.0

java.lang.UnsatisfiedLinkError: No implementation found for com.amazonaws.ivs.broadcast.Device$Descriptor[] com.amazonaws.ivs.broadcast.Device$Descriptor.listAvailableDevices(android.content.Context) (tried Java_com_amazonaws_ivs_broadcast_Device_00024Descriptor_listAvailableDevices and Java_com_amazonaws_ivs_broadcast_Device_00024Descriptor_listAvailableDevices__Landroid_content_Context_2)
                    at com.amazonaws.ivs.broadcast.Device$Descriptor.listAvailableDevices(Native Method)
                    at com.amazonaws.ivs.broadcast.Device$Descriptor.availableDevices(Device.java:114)
                    at com.amazonaws.ivs.broadcast.Device$Descriptor.access$000(Device.java:30)
                    at com.amazonaws.ivs.broadcast.Device.listAvailableDevices(Device.java:20)
                    at com.amazonaws.ivs.broadcast.Session.listAvailableDevices(Session.java:54)
dang-tommy commented 1 year ago

Hi @KunNiu, thanks for raising this issue. We've identified the cause as being related to the Presets class and will have a fix in 1.8.1.

As a workaround, you can unblock yourself by adding a simple call to BroadcastSession before using the Presets class. I'd recommend adding a call to BroadcastSession.getVersion() just before using any Presets methods for minimal changes.

Example:

BroadcastSession.getVersion()
var front = Presets.Devices.FRONT_CAMERA(applicationContext)
KunNiu commented 1 year ago

@dang-tommy thanks for your reply. And your solution works for me.

dang-tommy commented 1 year ago

This bug has been fixed with the 1.9.0 release.