Skip to content

Xamarin Forms app used to work but now throws with "libc++_shared.so\" not found"

Description

SOLUTION:

Rolled back to 3.4.

ERROR:

"failed to load libc++_shared exception dlopen failed: library "libc++_shared.so" not found"

CALL STACK:

at LibVLCSharp.Shared.Core.LoadLibCpp () [0x00022] in <71901d56da8943b292b49a7e99d738c4>:0 at LibVLCSharp.Shared.Core.InitializeAndroid () [0x00000] in <71901d56da8943b292b49a7e99d738c4>:0 at LibVLCSharp.Shared.Core.Initialize (System.String libvlcDirectoryPath) [0x00000] in <71901d56da8943b292b49a7e99d738c4>:0 at VeamcastXamarin.ViewModels.PlayerViewModel.Play (VeamcastXamarin.ViewModels.AttachmentViewModel attachmentViewModel) [0x00009] in D:\Repos\Veamcast\SyncStor\VeamcastXamarin\VeamcastXamarin\VeamcastXamarin\ViewModels\PlayerViewModel.cs:115

CODE:

    public void Play(AttachmentViewModel attachmentViewModel)
    {
        try
        {
            CurrentPlayListItem = attachmentViewModel;

        //    Java.Lang.JavaSystem.LoadLibrary("c++_shared");
            Core.Initialize();

            LibVLC = new LibVLC();

            var uri = new Uri(attachmentViewModel.StreamUrl);

            var media = new Media(LibVLC, uri.AbsoluteUri, FromType.FromLocation);

            MediaPlayer = new MediaPlayer(media) { EnableHardwareDecoding = true };

            MediaPlayer.Play();

            //   OnPropertyChanged("MediaPlayer");

        }
        catch (Exception ex)
        {
            Error = ex;
        }
    }

Expected behavior

Actual behavior

Steps to reproduce

Screenshot / video

Context

App version

Android version

Device model

App mode

Smartphone

TV

Auto

Edited by Joe Dean
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information