在Windows Phone 8 / 8.1上,navigator.camera.getPicture打开photolibrary并调用onSuccess回调函数,但同时它会引发跟随错误"' System.NullReferenceException'发生在worklight-windowsphone8.DLL"关闭worklight应用程序 --Scenerio Worklight 6.3.0 windowsphone8 enviornment创建了新的环境。科尔多瓦3.6 按钮单击Windows Phone 8 / 8.1 photogallery打开图像被选中,photoalbum关闭,我看到警报的长度,但同时引发上述错误。
--code on button click
function onClickB(){
navigator.camera.getPicture(onSuccess, onFail, {
quality : 20,
destinationType : navigator.camera.DestinationType.DATA_URL,
sourceType : navigator.camera.PictureSourceType.PHOTOLIBRARY
});
function onSuccess(imageData)
{
alert(imageData.length);--it gives me length Number
var VarUsedtoSendToAdapter=imageData;
}
--OnVS Debug Console get
System.NullReferenceException' occurred in worklight-windowsphone8.DLL on Continue it closes the application
答案 0 :(得分:0)
我们无法重新创建此问题。
重新创建的步骤 -
使用的代码 -
function onClickB(){
navigator.camera.getPicture(onSuccess, onFail, {
quality : 20,
destinationType : navigator.camera.DestinationType.DATA_URL,
sourceType : navigator.camera.PictureSourceType.PHOTOLIBRARY
});
function onSuccess(imageData){
alert(imageData.length);
var VarUsedtoSendToAdapter=imageData;
}
function onFail(message){
alert ("Failed because " + message);
}
}
试验1:
环境 -
IBM MobileFirst studio - 6.3.0.00-20141127-1357 Visual Studio Professional 2013 Update 2 目标 - Windows Phone 8.0
试验2:
IBM MobileFirst studio - 6.3.0.00-20150214-1702 Visual Studio Professional 2013 Update 2 目标 - Windows Phone 8.0
结果(两次试验中) -
1)设备1 - 诺基亚Lumia 1520 - WP 8.1更新1
Library launches, we select file , length is alerted.
The message -"System.NullReferenceException' occurred in worklight-windowsphone8.DLL" does not appear
2)设备2 - HTC 8x(Windows 8.0
Library launches, we select file , length is alerted.
The message -"System.NullReferenceException' occurred in worklight-windowsphone8.DLL" does not appear
使用来自相册和相机胶卷的不同文件大小的多张图片进行测试,结果相同。
问题:
1)在Mobile First 6.3工作室上新创建的项目是否会出现问题?
2)项目是否迁移到6.3?如果是这样,您可以尝试删除WP 8环境并再次添加吗?