Visual studio NSInvalidArgumentException***-[NSURL initFileURLWithPath:]:nil字符串参数

Visual studio NSInvalidArgumentException***-[NSURL initFileURLWithPath:]:nil字符串参数,visual-studio,xamarin,xamarin.ios,console,google-vr,Visual Studio,Xamarin,Xamarin.ios,Console,Google Vr,我正在尝试使用Xamarin表单开发一个项目,特别是Ios共享代码,在我将Google Vr SDK库与ApDefinition&StructAndEnums类和GVRSDK静态库完美绑定后,我有一些问题需要解决。 当我将GVRVideoView小部件插入我的ViewController时,两个关于全屏和硬纸板视图模式的按钮不会出现;我已经在代码中插入了它们自己的enable方法。 当我点击它们时,应用程序崩溃,调试控制台给我这些异常。我不知道我该怎么办。 也许有人能帮我讨论一下这些问题 201

我正在尝试使用Xamarin表单开发一个项目,特别是Ios共享代码,在我将Google Vr SDK库与ApDefinition&StructAndEnums类和GVRSDK静态库完美绑定后,我有一些问题需要解决。 当我将GVRVideoView小部件插入我的ViewController时,两个关于全屏和硬纸板视图模式的按钮不会出现;我已经在代码中插入了它们自己的enable方法。 当我点击它们时,应用程序崩溃,调试控制台给我这些异常。我不知道我该怎么办。 也许有人能帮我讨论一下这些问题

2017-04-12 12:45:00.413 App18.iOS[1335:1127396] INFO 
[vr/gvr/capi/src/gvr.cc:109] Initialized GVR version 1.30.0
2017-04-12 12:45:04.872 App18.iOS[1335:1127349] Xamarin.iOS: Received 
unhandled ObjectiveC exception: NSInvalidArgumentException *** -[NSURL 
initFileURLWithPath:]: nil string parameter
2017-04-12 12:45:05.179 App18.iOS[1335:1127349] Objective-C exception 
thrown.  Name: NSInvalidArgumentException Reason: *** -[NSURL 
initFileURLWithPath:]: nil string parameter
Native stack trace:
0   CoreFoundation                      0x1b773b55 <redacted> + 152
1   libobjc.A.dylib                     0x1a9fb067 objc_exception_throw + 38
2   CoreFoundation                      0x1b773a85 <redacted> + 0
3   Foundation                          0x1c01fc69 <redacted> + 120
4   Foundation                          0x1c01fbdb <redacted> + 42
5   App18.iOS                           0x00098e67 -[GVRTransitionView 
loadView] + 510
6   App18.iOS                           0x00098c0f -[GVRTransitionView 
initWithFrame:delegate:] + 190
7   App18.iOS                           0x0008e277 -
[GVROverlayViewController init] + 246
8   App18.iOS                           0x000a0f6d -[GVRWidgetView 
goIntoFullscreenMode] + 76
9   App18.iOS                           0x000a198d -[GVRWidgetView 
didTapFullscreenButton:] + 20
1
0  UIKit                               0x209d6805 <redacted> + 76
11  UIKit                               0x209d6799 <redacted> + 62
12  UIKit                               0x209c0dc9 <redacted> + 478
13  UIKit                               0x209d60d5 <redacted> + 604
14  UIKit                               0x209d5c1f <redacted> + 2094
15  UIKit                               0x209d0b5f <redacted> + 2798
16  UIKit                               0x209a2703 <redacted> + 308
17  UIKit                               0x21135d37 <redacted> + 2254
18  UIKit                               0x211306db <redacted> + 4186
19  UIKit                               0x21130abd <redacted> + 144
20  CoreFoundation                      0x1b72ffdd <redacted> + 12
21  CoreFoundation                      0x1b72fb05 <redacted> + 424
22  CoreFoundation                      0x1b72df51 <redacted> + 1160
23  CoreFoundation                      0x1b6810ef CFRunLoopRunSpecific + 
470
24  CoreFoundation                      0x1b680
f11 CFRunLoopRunInMode + 104
25  GraphicsServices                    0x1ce2bb41 GSEventRunModal + 80
26  UIKit                               0x20a05e83 UIApplicationMain + 150
27  App18.iOS                           0x00fd2d6c 
2017-04-12 12:45:00.413 App18.iOS[1335:1127396]信息
[vr/gvr/capi/src/gvr.cc:109]已初始化gvr版本1.30.0
2017-04-12 12:45:04.872 App18.iOS[1335:1127349]Xamarin.iOS:已收到
未处理的Objective异常:NSInvalidArgumentException***-[NSURL
initFileURLWithPath::nil字符串参数
2017-04-12 12:45:05.179附录18.iOS[1335:1127349]目标-C例外
扔。名称:NSInvalidArgumentException原因:**-[NSURL
initFileURLWithPath::nil字符串参数
本机堆栈跟踪:
0芯基础0x1b773b55+152
1 libobjc.A.dylib 0x1a9fb067 objc_异常_抛出+38
2芯基础0x1b773a85+0
3基金会0x1C01FC69+ 120
4基金会0x1C01FBDB + 42
5 App18.iOS 0x00098e67-[GVRTransitionView
负荷视图]+510
6 App18.iOS 0x00098c0f-[GVRTransitionView
initWithFrame:delegate:+190
7 App18.iOS 0x0008e277-
[GVROverlayViewController初始化]+246
8 App18.iOS 0x000a0f6d-[GVRWidgetView
goIntoFullscreenMode]+76
9 App18.iOS 0x000a198d-[GVRWidgetView
didTapFullscreenButton:+20
1.
0 UIKit 0x209d6805+76
11 UIKit 0x209d6799+62
12 UIKit 0x209c0dc9+478
13 UIKit 0x209d60d5+604
14 UIKit 0x209d5c1f+2094
15 UIKit 0x209d0b5f+2798
16 UIKit 0x209a2703+308
17 UIKit 0x21135d37+2254
18 UIKit 0x211306db+4186
19 UIKit 0x21130abd+144
20芯基础0x1b72ffdd+12
21芯基础0x1b72fb05+424
22芯基础0x1b72df51+1160
23 CoreFoundation 0x1b6810ef CFRunLoopRunSpecific+
470
24芯基础0x1b680
f11 CFRUNLOOPS运行模式+104
25图形服务0x1ce2bb41 GSEventRunModal+80
26 UIKit 0x20a05e83 UIApplicationMain+150
27 App18.iOS 0x00fd2d6c
包装器\u托管\u到\u本机\u UIKit\u UIApplication\u UIApplicationMain\u int\u字符串\u int ptr_intptr+324 28 App18.iOS 0x00f764b0 UIKit_UIApplication_Main_string_uuuuuintptr_intptr+52 29 App18.iOS 0x00f76470 UIKit\u UIApplication\u Main\u string\u string\u string+204 30 App18.iOS 0x0042d820 App18\u iOS\u应用程序\u主\u字符串\u+192 31 App18.iOS 0x00690ae4

包装器\u运行时\u调用\u对象\u运行时\u调用\u动态\u intptr\u intptr\u intptr\u intptr+256 32 App18.iOS 0x0036cd45单声道实时运行时调用+ 1528 33 App18.iOS 0x003b9937执行运行时调用+78 34 App18.iOS 0x003bb90d do_exec_main_checked+84 35 App18.iOS
0x0035b0ad mono_jit_exec+194 36 App18.iOS 0x0042c660 xamarin_main+2484 37 App18.iOS 0x01143be1主+112
38 libdyld.dylib 0x1ae6e4eb+2

不知何故,您在方法[NSURL]中将“nil”作为参数传递 initFileURLWithPath:。 添加一个断点以检查在方法中传递的值。 同时分享代码,以便我们更好地为您提供建议