使用Xamarin表单播放音频失败,并出现错误:未为iOS模拟器构建NRDAudioClient

时间:2019-06-18 18:20:34

标签: ios xamarin audio

我正在尝试使用Xamarin Forms应用程序播放音频。在iOS实施中,我将此代码称为(URL是我要播放的文件的完整路径):

    this.player = new AVPlayer();
    this.player = AVPlayer.FromUrl(NSUrl.FromString(url));
    this.player.Play();

在模拟器中运行时看到以下错误:

2019-06-18 19:02:18.310742+0100 Animalike2App.iOS[11991:167215] SecTaskLoadEntitlements failed error=22 cs_flags=200, pid=11991
2019-06-18 19:02:18.311079+0100 Animalike2App.iOS[11991:167215] SecTaskCopyDebugDescription: Animalike2App.iO[11991]/0#-1 LF=0
2019-06-18 19:02:18.490415+0100 Animalike2App.iOS[11991:167215] SecTaskLoadEntitlements failed error=22 cs_flags=200, pid=11991
2019-06-18 19:02:18.490964+0100 Animalike2App.iOS[11991:167215] SecTaskCopyDebugDescription: Animalike2App.iO[11991]/0#-1 LF=0
2019-06-18 19:02:18.670057+0100 Animalike2App.iOS[11991:167176] Error loading /Library/Audio/Plug-Ins/HAL/NRDAudioClient.plugin/Contents/MacOS/NRDAudioClient:  dlopen(/Library/Audio/Plug-Ins/HAL/NRDAudioClient.plugin/Contents/MacOS/NRDAudioClient, 262): no suitable image found.  Did find:
    /Library/Audio/Plug-Ins/HAL/NRDAudioClient.plugin/Contents/MacOS/NRDAudioClient: mach-o, but not built for iOS simulator
2019-06-18 19:02:18.670271+0100 Animalike2App.iOS[11991:167176] Cannot find function pointer NRDACLN_New_Instance for factory <CFUUID 0x6040016385a0> 3E9FAD07-70A8-4980-B39B-BB8B905C9872 in CFBundle/CFPlugIn 0x7ff70a45d0f0 </Library/Audio/Plug-Ins/HAL/NRDAudioClient.plugin> (bundle, not loaded)
2019-06-18 19:02:21.185424+0100 Animalike2App.iOS[11991:167198] [aqme] 177: timed out after 0.012s (128 128); suspension count=0 (IOSuspensions: )

我在Windows PC上工作,并使用macincloud运行代码连接到Mac机器。

谢谢!

0 个答案:

没有答案