Vlc-sdk-lib
Vlc-sdk-lib copied to clipboard
Failed to upgrade to 'com.yyl.vlc:vlc-android-sdk:3.3.0'
I have found that the stream is freezing after some time for different cameras in the project.
I'm using react-native-vlcplayer package in the RN app and inside it uses this library my 3.0.10
version.
After upgrading from com.yyl.vlc:vlc-android-sdk:3.0.10
to com.yyl.vlc:vlc-android-sdk:3.3.0
it video freezing issue was fixed in the test project but when I'm trying to migrate it to another project I'm receiving this kind of error:
More than one file was found with OS independent path 'lib/x86/libc++_shared.so'
I have found thread in react-native-ffmpeg library with a similar issue. The library maintainer said that it's because of c++ core library was changed in ReactNative core.
libgnustl_shared.so is replaced with libc++_shared.so in react-native 0.59. react-native-ffmpeg already includes libc++_shared.so so using react-native 0.59 causes the More than one file was found with OS independent path 'lib/x86/libc++_shared.so' error.
And have proposed to use the next solution inside your project app/build.gradle
file:
packagingOptions {
pickFirst 'lib/x86/libc++_shared.so'
pickFirst 'lib/x86_64/libc++_shared.so'
pickFirst 'lib/armeabi-v7a/libc++_shared.so'
pickFirst 'lib/arm64-v8a/libc++_shared.so'
}
It started to compile and run but when I'm going to open the stream with VLCPlayer
component app crashes with the next error in logs.
E/VLC/LibVLC: Can't load vlcjni library: java.lang.UnsatisfiedLinkError: dlopen failed: cannot locate symbol "__emutls_get_address" referenced by "/data/app/com.omo.systems-2/lib/arm/libvlc.so"...
Maybe vlcjni
trying to use another standard c++ library instead of provided by react-native
library.
My RN version in 0.61.5
.
Also, I have reported this issue here.
Thanks in advance!
Try to reference the repository by excluding dependencies
android {
.......
packagingOptions {
// pickFirst '**/libvlc.so'
// pickFirst '**/libvlcjni.so'
pickFirst '**/c++_shared.so'
}
}
//
implementation('com.yyl.vlc:vlc-android-sdk:3.3.0'){
transitive = false
}
implementation 'org.videolan.android:libvlc-all:3.3.8'
@mengzhidaren Thanks for your reply. I have tried your proposal and still not work. The issue is the same.
2020-12-04 17:06:30.233 15105-15105/com.APPLICATION_PACKAGE I/VLC/LibVLC/Util: ELF ABI = x86, 32bits
2020-12-04 17:06:30.233 15105-15105/com.APPLICATION_PACKAGE I/VLC/LibVLC/Util: ELF arch = null
2020-12-04 17:06:30.233 15105-15105/com.APPLICATION_PACKAGE I/VLC/LibVLC/Util: ELF fpu = false
2020-12-04 17:06:30.246 15105-15105/com.APPLICATION_PACKAGE D/VLC/LibVLC/Util: machineSpecs: hasArmV6: true, hasArmV7: true, hasX86: true, is64bits: false
2020-12-04 17:06:30.278 15105-15105/com.APPLICATION_PACKAGE E/VLC/LibVLC: Can't load vlcjni library: java.lang.UnsatisfiedLinkError: dlopen failed: cannot locate symbol "__emutls_get_address" referenced by "/data/app/~~pn9J4tSS_TXEy8mwt7gAgQ==/com.APPLICATION_PACKAGE--GBzowiLYH8YGLFzX1ZjHQ==/lib/x86/libvlc.so"...
The dependencies:
implementation "com.facebook.react:react-native:+"
implementation('com.yyl.vlc:vlc-android-sdk:3.3.0'){
transitive = false
}
implementation 'org.videolan.android:libvlc-all:3.3.8'
From build.gradle:
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
packagingOptions {
pickFirst 'lib/**/libc++_shared.so'
pickFirst '**/c++_shared.so'
}
Do have any ideas?
@davinctor Hi,I have the same problem,did you solve it
@mengzhidaren Unfortunately, not yet but right now it's not blocking me. I am using 3.1.7 version.
I got same problem, any ideal to solve it It works fine with org.videolan.android:libvlc-all:3.1.12
Did anyone solve this? 3.2.6 works fine, but nothing above it.
implementation('com.yyl.vlc:vlc-android-sdk:3.3.0'){
transitive = false
}
implementation 'org.videolan.android:libvlc-all:*.*.*'
Try to lower this version number and find a version that can run normally. There is no better solution at present, you can only go to the official vlc warehouse to submit issues
https://search.maven.org/artifact/org.videolan.android/libvlc-all
@mengzhidaren @davinctor Maybe someone solved this issue and there are any better solutions than downgrading to 3.2.6 version?