React Native and Android module with libVLC - "Can't load vlcjni library"
Asked Answered
E

0

6

I have React Native application that is implementing native Android module. In this module I have libVLC implemented and everything is working correctly. Unfortunately after importing this module to React Native application at first I had problem with building application:

 More than one file was found with OS independent path 'lib/x86/libc++_shared.so'

After that I added this lines to build gradle:

  packagingOptions {
    pickFirst 'lib/arm64/libvlc.so'
    pickFirst 'lib/x86/libc++_shared.so'
    pickFirst 'lib/arm64-v8a/libc++_shared.so'
    pickFirst 'lib/x86_64/libc++_shared.so'
    pickFirst 'lib/armeabi-v7a/libc++_shared.so'
  }

Which helped and application started to build - but unfortunately when launching native fragment with VLC I'm getting this kind of error:

Can't load vlcjni library: java.lang.UnsatisfiedLinkError: dlopen failed: cannot locate symbol "__sfp_handle_exceptions" referenced by "/data/app/[...]/lib/arm64/libvlc.so"...

I've tried to find solution online and I tried different approaches but I cannot solve this issue. Maybe someone will be able to help me with some workaround for this.

Expatiate answered 26/7, 2022 at 8:29 Comment(1)
did you ever find a solution to this? pickFirst is not a solution for our usecaseShevlo

© 2022 - 2024 — McMap. All rights reserved.