“TypeError:无法读取未定义的属性'URI'”
每当我尝试在Ionic2中使用原生屏幕截图方法时,我都会收到此错误。
我的代码:
this.screenshot.URI(80).then((result) => {
console.log(result);
}, (err) => {
console.log(err);
});
这是Ionic2截图文档:https://ionicframework.com/docs/native/screenshot/
"dependencies": {
"@angular/common": "4.0.0",
"@angular/compiler": "4.0.0",
"@angular/compiler-cli": "4.0.0",
"@angular/core": "4.0.0",
"@angular/forms": "4.0.0",
"@angular/http": "4.0.0",
"@angular/platform-browser": "4.0.0",
"@angular/platform-browser-dynamic": "4.0.0",
"@ionic-native/camera": "^3.6.0",
"@ionic-native/core": "3.6.1",
"@ionic-native/file": "^3.6.0",
"@ionic-native/file-path": "^3.6.0",
"@ionic-native/screenshot": "^3.6.1",
"@ionic-native/splash-screen": "3.4.2",
"@ionic-native/status-bar": "3.4.2",
"@ionic-native/transfer": "^3.6.0",
"@ionic/storage": "2.0.1",
"crypto-js": "3.1.9-1",
"fast-sha256": "1.0.0",
"ionic-angular": "3.0.1",
"ionic-native": "^3.5.0",
"ionicons": "3.0.0",
"rxjs": "5.1.1",
"sha256": "0.2.0",
"sw-toolbox": "3.4.0",
"ts-md5": "1.2.0",
"zone.js": "^0.8.4"