Hello!
I’m having problems with the native camera plugin in an android device (in iOS devices is working fine). When trying to open the Camera or the PhotoLibrary, I received the following error:
[18:09:05] console.warn: Native: tried calling Camera.getPicture, but Cordova is not available. Make sure to include
cordova.js or run in a device/simulator
[18:09:05] console.error: error con la imagen: cordova_not_available
[18:09:11] console.warn: Native: tried calling Camera.getPicture, but Cordova is not available. Make sure to include
cordova.js or run in a device/simulator
[18:09:11] console.error: error con la imagen: cordova_not_available
I have tested in both device and emulator with the same result.
Here is my plugin list and ionic environment.
ionic cordova plugin
cordova plugin ls
cordova-plugin-camera 4.0.2 “Camera”
cordova-plugin-device 2.0.1 “Device”
cordova-plugin-file 6.0.1 “File”
cordova-plugin-file-transfer 1.7.1 “File Transfer”
cordova-plugin-filepath 1.0.2 “FilePath”
cordova-plugin-ionic-keyboard 2.0.5 “cordova-plugin-ionic-keyboard”
cordova-plugin-ionic-webview 1.1.16 “cordova-plugin-ionic-webview”
cordova-plugin-splashscreen 5.0.2 “Splashscreen”
cordova-plugin-statusbar 2.4.1 “StatusBar”
cordova-plugin-whitelist 1.3.3 “Whitelist”
cordova-sqlite-storage 2.3.0 “Cordova sqlite storage plugin”
ionic info
cli packages: (/usr/local/lib/node_modules)
@ionic/cli-utils : 1.19.2 ionic (Ionic CLI) : 3.20.0
global packages:
cordova (Cordova CLI) : 8.0.0
local packages:
@ionic/app-scripts : 3.1.8 Cordova Platforms : android 7.0.0 browser 5.0.3 ios 4.5.4 Ionic Framework : ionic-angular 3.9.2
System:
Android SDK Tools : 26.1.1 ios-deploy : 1.9.2 Node : v6.11.5 npm : 5.6.0 OS : macOS High Sierra Xcode : Xcode 9.2 Build version 9C40b
I’ve tried uninstalling the plugins, the platform and reinstalling all over again.
Any suggestions, please?