You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

向Xamarin Forms项目添加音频文件时出现文件未找到错误

问题:添加音频文件后出现文件找不到错误,无法正常播放音频

添加音频文件后的错误界面

我将bip.wav文件添加到Assets文件夹后,出现了**"the system cannot find the file specified"**错误。

项目文件结构

删除该音频文件后,清理并重新生成解决方案,应用就能正常运行。现在无法向项目中添加音频文件。

以下是用于播放音频的代码:

var player = Plugin.SimpleAudioPlayer.CrossSimpleAudioPlayer.Current; 
player.Load("bip.wav"); 
player.Play();

内容的提问来源于stack exchange,提问作者Mert Altiparmak

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.20 20:52:00