2016-04-06 10 views
0

私は新しい写真を撮るとき、私は次のエラーメッセージが出ます:コルドバカメラプラグインウィンドウ8.1 getPicture()メソッドの問題

undefined or null reference error

例外が「CameraProxy.jsの次の関数で焼成さをsavePhoto(の絵」引数)「私は、アプリケーション、デバッグすると

function savePhoto(picture, options, successCallback, errorCallback) { 
// success callback for capture operation 
var success = function(picture) { 
    if (options.destinationType == Camera.DestinationType.FILE_URI || options.destinationType == Camera.DestinationType.NATIVE_URI) { 
     if (options.targetHeight > 0 && options.targetWidth > 0) { 
      resizeImage(successCallback, errorCallback, picture, options.targetWidth, options.targetHeight, options.encodingType); 
     } else { 
      picture.copyAsync(getAppData().localFolder, picture.name, OptUnique).done(function (copiedFile) { 
       successCallback("ms-appdata:///local/" + copiedFile.name); 
      },errorCallback); 
     } 
    } else { .... 

ファイル」機能は未定義であるように思われる。

マイjavacriptファイルには、カメラプラグインを呼び出すための次の関数が含まれています:

$scope.getNewPicture = function() { 
     navigator.camera.getPicture(function (imageURL) { 
     console.log("ImageURL: " + imageURL); 
    }, function (message) { 
     console.log('Failed retrieving picture: ' + message); 
    }, { 
     quality: 50, 
     destinationType: Camera.DestinationType.FILE_URI 
    } 
) 
}; 

他にもこの問題が発生しましたか?

答えて

0

プラグインのバージョンを古いバージョン(1.2.0)に変更しましたが、今はうまく機能しているようです。 (以前はバージョン2.xを使用していました)

関連する問題