我正在尝试从 xml 填充 UITableView 并使用 xamarin.ios 进行开发。在我尝试运行应用程序并选择选项卡后,应用程序上的 UITableView 崩溃并抛出 ArgumentNullException。
异常如下:“System.ArgumentNullException.Argument cannot be null.Parameter name:url”并抛出XDocument xmlDoc = XDocument.Load(clubFile);
var clubFile = NSBundle.MainBundle.PathForResource ("FootballLeagueTeamInfo", "xml");
XDocument xmlDoc = XDocument.Load (clubFile);
xml 文档本地保存在解决方案/应用程序中,而不是任何子文件夹中。我不太确定网址是什么以及它会去哪里。
任何帮助,将不胜感激!谢谢。