2017-04-12 61 views
0

我想開發一個Xamarin Forms的項目,特別是Ios共享代碼,其中,我將綁定的谷歌Vr SDK庫完美ApDefinition & StructAndEnums類和GVRSDK靜態庫,我有一些問題需要解決。 當我將GVRVideoView小部件插入到ViewController中時,不會出現有關全屏和紙板視圖模式的兩個按鈕;我已經將自己的啓用方法插入代碼來執行此操作。 另外,當我點擊他們的應用程序崩潰和調試控制檯給我這些例外。我不知道我該怎麼做。 也許任何人都可以幫忙和我討論這些問題?NSInvalidArgumentException *** - [NSURL initFileURLWithPath:]:無字符串參數

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 

wrapper_managed_to_native_UIKit_UIApplication_UIApplicationMain_int_string___int ptr_intptr + 324 28個App18.iOS 0x00f764b0 UIKit_UIApplication_Main_string___intptr_intptr + 52個 29 App18.iOS 0x00f76470 UIKit_UIApplication_Main_string___string_string + 204個 30 App18.iOS 0x0042d820 App18_iOS_Application_Main_string__ + 192個 31 App18.iOS 0x00690ae4

wrapper_runtime_invoke_obj ect_runtime_invoke_dynamic_intptr_intptr_intptr_intptr + 256 32 App18.iOS 0x0036cd45 mono_jit_runtime_invoke + 33 App18.iOS 0x003b9937 do_runtime_invoke + 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

回答

0

不知何故要傳遞 '零' 如在方法[NSURL initFileURLWithPath:]的參數。 添加斷點以檢查您在方法中傳遞的值。 也分享代碼,以便我們可以更好地爲您提供建議。