razorRun / react-native-vlc-media-player

React native media player for video streaming and playing. Supports RTSP, RTMP and other protocols supported by VLC player
https://roshan.digital/
MIT License
354 stars 184 forks source link

can't start streaming #148

Closed kozhinas closed 2 weeks ago

kozhinas commented 1 year ago

I can't start watching the broadcast, I get an error:

E/VLC/LibVLC: Can't load vlcjni library: java.lang.UnsatisfiedLinkError: dlopen failed: cannot locate symbol "__sfp_handle_exceptions" referenced by "/data/app/~~0iD7HmnfGFQUdQJ3xy15BQ==/com.appname-oo202GHf6hsrXlxBu6GMFQ==/lib/arm64/libvlc.so"...

kozhinas commented 1 year ago

Android 8.0 all work, android 12 not work

gandous commented 1 year ago

You need to add this to your android/app/build.gradle

tasks.whenTaskAdded((tas -> {
    // when task is 'mergeLocalDebugNativeLibs' or 'mergeLocalReleaseNativeLibs'
    if (tas.name.contains("merge") && tas.name.contains("NativeLibs")) {
        tasks.named(tas.name) {it
            doFirst {
                java.nio.file.Path notNeededDirectory = it.externalLibNativeLibs
                        .getFiles()
                        .stream()
                        // for React Native 0.71, the file value now contains "jetified-react-android" instead of "jetified-react-native"
                        .filter(file -> file.toString().contains("jetified-react-native"))
                        .findAny()
                        .orElse(null)
                        .toPath();
                Files.walk(notNeededDirectory).forEach(file -> {
                    if (file.toString().contains("libc++_shared.so")) {
                        Files.delete(file);
                    }
                });
            }
        }
    }
}))

All the details are explained in the readme https://github.com/razorRun/react-native-vlc-media-player#android

github-actions[bot] commented 1 month ago

This issue is stale because it has been open for 60 days with no activity.

github-actions[bot] commented 2 weeks ago

This issue was closed because it has been inactive for 14 days since being marked as stale.