Xamarin.forms Plugin.MediaManager.Forms在xamarin uwp中不起作用
我正在使用Plugin.MediaManager.Forms播放音频。它在android和ios中运行良好。但在windows中,应用程序正在与Xamarin.forms Plugin.MediaManager.Forms在xamarin uwp中不起作用,xamarin.forms,uwp,plugin.mediamanager.forms,Xamarin.forms,Uwp,Plugin.mediamanager.forms,我正在使用Plugin.MediaManager.Forms播放音频。它在android和ios中运行良好。但在windows中,应用程序正在与系统中断。未实现异常。 版本详细信息: Plugin.MediaManager.Forms:1.0.7 Xamarin表格:4.8.0.1821 Visual Studio:16.8.3 Windows目标版本:Windows 10版本1903(10.0;内部版本18362) Windows最低版本:Windows 10秋季创建者更新(10.0;版本1
系统中断。未实现异常。
版本详细信息:
Plugin.MediaManager.Forms:1.0.7
Xamarin表格:4.8.0.1821
Visual Studio:16.8.3
Windows目标版本:Windows 10版本1903(10.0;内部版本18362)
Windows最低版本:Windows 10秋季创建者更新(10.0;版本16299)
此外,我还在Package.appxmanifest的capabilities下添加了“背景媒体播放”、“互联网”、“音乐库”和“视频库”
我还缺少什么
Plugin.MediaManager.Forms在xamarin uwp中不起作用
它看起来是Plugin.MediaManager.Forms的bug,请尝试将Plugin.MediaManager.Forms版本降低到0.9.6。并调用CrossMediaManager.Current.Init(),如下所示。它会起作用的
if (rootFrame == null)
{
// Create a Frame to act as the navigation context and navigate to the first page
rootFrame = new Frame();
rootFrame.NavigationFailed += OnNavigationFailed;
Xamarin.Forms.Forms.Init(e);
CrossMediaManager.Current.Init();
ApplicationView.PreferredLaunchViewSize = new Size(600, 900);
ApplicationView.PreferredLaunchWindowingMode = ApplicationViewWindowingMode.PreferredLaunchViewSize;
if (e.PreviousExecutionState == ApplicationExecutionState.Terminated)
{
//TODO: Load state from previously suspended application
}
// Place the frame in the current Window
Window.Current.Content = rootFrame;
}
Plugin.MediaManager.Forms在xamarin uwp中不起作用
它看起来是Plugin.MediaManager.Forms的bug,请尝试将Plugin.MediaManager.Forms版本降低到0.9.6。并调用CrossMediaManager.Current.Init(),如下所示。它会起作用的
if (rootFrame == null)
{
// Create a Frame to act as the navigation context and navigate to the first page
rootFrame = new Frame();
rootFrame.NavigationFailed += OnNavigationFailed;
Xamarin.Forms.Forms.Init(e);
CrossMediaManager.Current.Init();
ApplicationView.PreferredLaunchViewSize = new Size(600, 900);
ApplicationView.PreferredLaunchWindowingMode = ApplicationViewWindowingMode.PreferredLaunchViewSize;
if (e.PreviousExecutionState == ApplicationExecutionState.Terminated)
{
//TODO: Load state from previously suspended application
}
// Place the frame in the current Window
Window.Current.Content = rootFrame;
}
我已经在github上看到了您的问题,现在看到了这个堆栈问题。
我在电脑上解决了这个问题。合并PR后,您可以更新到最新版本。顺便说一下,您必须使用UWP 10.0.18362.0(版本1903)min
目标版本从uap 10.0.18362.0(版本1903)降级到10.0.17763(版本1809),从版本0.9.7降级到0.9.9。现在,您必须使用v。0.9.7我已经在github上看到了您的问题,现在看到了这个堆栈问题。
我在电脑上解决了这个问题。合并PR后,您可以更新到最新版本。顺便说一下,您必须使用UWP 10.0.18362.0(版本1903)min
目标版本从uap 10.0.18362.0(版本1903)降级到10.0.17763(版本1809),从版本0.9.7降级到0.9.9。现在,您必须使用v。0.9.7版本缩减仅适用于windows或所有项目?对所有项目更好。版本缩减仅适用于windows或所有项目?对所有项目更好。