Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cannot install cordova camera plugin using Ionic 2 framework

I am trying to install cordova plugin for camera to use in Ionic 2 application, but I am keep getting error:

Failed to install 'cordova-plugin-camera': CordovaError: Version of installed plugin: "[email protected]" does not satisfy dependency plugin requirement "cordova-plugin-compat@^1.1.0". Try --force to use installed plugin as dependency.

I tried removing cordova plugin compat and reinstalling it since I found many answers about this error on stackoverflow, but none of them worked for me. I also tried it with --force flag, but no success.

Also I tried: cordova plugin remove cordova-plugin-compat --force But I get an error:

Error: Cannot find plugin.xml for plugin "cordova-plugin-camera". Please try adding it again.

I really hope anyone can help me since I am stuck here... Thank you in beforehand.

like image 824
Luki Avatar asked Nov 29 '22 22:11

Luki


1 Answers

This might help you:

cordova plugin remove --force cordova-plugin-compat  
cordova plugin add cordova-plugin-compat  
cordova platform remove android  
cordova platform add android  
cordova plugin add cordova-plugin-camera
like image 166
rlwt Avatar answered Dec 04 '22 14:12

rlwt