TLDR:' System.SystemException'发生在Microsoft.Phone.Interop.ni.dll wp8 cordova试图访问相机
我一直在努力让一个基本的wp8 cordova应用程序工作了好几天,但是我被错误所困扰,无论是在我的任何代码处理之前还是在我的代码中,应用程序都会运行这些错误然而,当我尝试访问本机资源,即相机和相机滚动时,会抛出更多错误并且调用失败,所以我试图一次解决这个问题,我已经完成了很多教程和示例但是我点击了每次都是同样的问题。
我正在使用最新的phonegap和visual studio express 2012 for Windows phone在Windows 8.1上工作。我安装了所有必要的框架,并使用visual studio模拟器和lumia 520进行测试。
我的申请是股票标准" Hello World" cordova应用程序,为WP8构建,然后我用各种示例代码修改了index.html。
我已经允许WMAppManifest.xml中的所有功能
我正在运行的错误是' System.SystemException'发生在" Microsoft.Phone.Interop.ni.dll"
这首先发生在BrowserMouseHelper.cs第89行的应用程序启动时(这是由cordova生成的代码,并且我自己没有触及)
每当我尝试触发navigator.camera.getPicture
时,我也会收到此错误在我尝试的每个示例项目中都会发生这种情况,因此它必须与我不了解的环境或配置设置相关。
我花了很多时间试图找到这个问题的参考并且没有成功,如果有人有这方面的经验,我会非常感谢方向。
'TaskHost.exe' (CLR C:\windows\system32\coreclr.dll: DefaultDomain): Loaded 'C:\windows\system32\mscorlib.ni.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'TaskHost.exe' (CLR C:\windows\system32\coreclr.dll: Silverlight AppDomain): Loaded 'C:\windows\system32\System.Windows.RuntimeHost.ni.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'TaskHost.exe' (CLR C:\windows\system32\coreclr.dll: Silverlight AppDomain): Loaded 'C:\windows\system32\System.Windows.ni.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'TaskHost.exe' (CLR C:\windows\system32\coreclr.dll: Silverlight AppDomain): Loaded 'C:\windows\system32\System.Net.ni.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'TaskHost.exe' (CLR C:\windows\system32\coreclr.dll: Silverlight AppDomain): Loaded 'C:\windows\system32\System.ni.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'TaskHost.exe' (CLR C:\windows\system32\coreclr.dll: Silverlight AppDomain): Loaded 'C:\windows\system32\System.Xml.ni.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'TaskHost.exe' (CLR C:\windows\system32\coreclr.dll: Silverlight AppDomain): Loaded 'C:\Data\Programs\{6352E5B2-FFD5-42B7-8A8E-93EAEC65B2E7}\Install\com.phonegap.helloworld.DLL'. Symbols loaded.
'TaskHost.exe' (CLR C:\windows\system32\coreclr.dll: Silverlight AppDomain): Loaded 'C:\windows\system32\Microsoft.Phone.ni.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'TaskHost.exe' (CLR C:\windows\system32\coreclr.dll: Silverlight AppDomain): Loaded 'C:\windows\system32\Microsoft.Phone.Interop.ni.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'TaskHost.exe' (CLR C:\windows\system32\coreclr.dll: Silverlight AppDomain): Loaded 'C:\windows\system32\System.Xml.Linq.ni.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'TaskHost.exe' (CLR C:\windows\system32\coreclr.dll: Silverlight AppDomain): Loaded 'C:\windows\system32\System.Core.ni.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
CordovaBrowser_LoadCompleted
A first chance exception of type 'System.SystemException' occurred in Microsoft.Phone.Interop.ni.dll
An exception of type 'System.SystemException' occurred in Microsoft.Phone.Interop.ni.dll and wasn't handled before a managed/native boundary
The thread 0xf70 has exited with code 259 (0x103).
CordovaBrowser_LoadCompleted
A first chance exception of type 'System.SystemException' occurred in Microsoft.Phone.Interop.ni.dll
答案 0 :(得分:0)
如果您发现自己遇到此问题:
您必须通过命令行将插件添加到项目中。
$ phonegap local plugin add [plugin uri]
Cordova / phonegap已将许多功能分离为插件。这些需要单独安装。
如果你正在学习旧的教程或文档,你可能没有遇到过这个事实,我最初没有。