我收到了一个与我正在处理的AR项目相关的非常奇怪的错误,我收到了一个System.NullReferenceException'发生在SLARToolKit WinPhone.DLL"与突出显示的特定代码行相关的错误,即:
private static Marker LoadFromResource(string relativePath, int segmentsX, int segmentsY, double width, System.Reflection.Assembly assembly)
{
var asmName = new System.Reflection.AssemblyName(assembly.FullName).Name;
using (var markerStream = Application.GetResourceStream(new Uri(asmName + ";component/" + relativePath, UriKind.Relative)).Stream)
{
return Load(markerStream, segmentsX, segmentsY, width);
}
}
特别强调了这一行:
using (var markerStream = Application.GetResourceStream(new Uri(asmName + ";component/" + relativePath, UriKind.Relative)).Stream)
此代码位于" Marker.cs"我猜的文件是SLARToolkit.DLL的一部分。我有什么想法可以收到此错误?提前谢谢。