xamarin LibVLCSharp System.NullReferenceException on Android
there is a code videopage.xaml.cs
it works on ios, there are no errors, but on android this code
MediaPlayer = new MediaPlayer(LibVLC)
{
Media = new Media(LibVLC,
url,
FromType.FromLocation)
};
gives an error:
System.NullReferenceException: Object reference not set to an instance of an object. at LibVLCSharp.Shared.MediaPlayer+<>c__DisplayClass3_0.<.ctor>b__0 () [0x00000] in <2e68ca79fbb94f278891672787098fb4>:0 at LibVLCSharp.Shared.Internal..ctor (System.Func
1[TResult] create, System.Action1[T] release) [0x0000d] in <2e68ca79fbb94f278891672787098fb4>:0 at LibVLCSharp.Shared.MediaPlayer..ctor (LibVLCSharp.Shared.LibVLC libVLC) [0x0002e] in <2e68ca79fbb94f278891672787098fb4>:0 at yotabit.Pages.VideoPage.GetVideoSource () [0x001f1] in /Users/i/Desktop/yotabit/yotabit/yotabit/Pages/VideoPage.xaml.cs:118 at yotabit.Pages.VideoPage.OnAppearing () [0x000dd] in /Users/i/Desktop/yotabit/yotabit/yotabit/Pages/VideoPage.xaml.cs:79 at System.Runtime.CompilerServices.AsyncMethodBuilderCore+<>c.<ThrowAsync>b__7_0 (System.Object state) [0x00000] in /Users/builder/jenkins/workspace/archive-mono/2020-02/android/release/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/AsyncMethodBuilder.cs:1021 at Android.App.SyncContext+<>c__DisplayClass2_0.<Post>b__0 () [0x00000] in <84ca7e914f6148f0b961431a9ac4287b>:0 at Java.Lang.Thread+RunnableImplementor.Run () [0x00008] in <84ca7e914f6148f0b961431a9ac4287b>:0 at Java.Lang.IRunnableInvoker.n_Run (System.IntPtr jnienv, System.IntPtr native__this) [0x00008] in <84ca7e914f6148f0b961431a9ac4287b>:0 at at (wrapper dynamic-method) Android.Runtime.DynamicMethodNameCounter.1(intptr,intptr)
worked on android before library update LibVlcSharp.Forms ver 3.4.1 to 3.4.9