Plugin not installed but i installed!


#1

hi,im using ionic2.
i installed camera plugin from:


and install :@ionic-native/camera for native plugin
but i run the app on device and i want to take picture, ionic give me error!!
that error is :slight_smile:
main.js:207 Native: tried calling Camera.getPicture, but the Camera plugin is not installed.
main.js:212 Install the Camera plugin: ‘ionic plugin add cordova-plugin-camera’

please help me
thank you


#2

have you added plugin in providers array ?


#3

Yes i added Camera to providers in app.module file
And still i have problem with this…


#4

please check the camera folder is present or not inside the node_modules->@ionic-native


#5

thank u for your response,yes camera folder is there,and whats next step ?


#6

please run cordova plugin list command in your terminal and check there camera plugin present or not.


#7

I have the same issue… When I run “cordova plugin list” I can see the “Camera” plugin


#8

Try deleting all generated/builded code/files/folders

  • node_modules
  • platforms (perform ionic cordova platform rm android / ios first)
  • plugins
  • www

Reboot computer and reinstall the dependencies

  • npm i
  • ionic cordova platform add android / ios (will create the platform and install the plugins automatically)
  • ionic cordova run android / ios

Not sure if this will help, but it can’t hurt to try.


#9

I had the same issue and took me about an hour to figure it out. When you install the plugin, make sure there are no warning messages. In my case it said the version of Cordova is not compatible with the plugin version. So I updated my Cordova, removed the Android platform, add the platform again and then add the plugin.


#10

In my case it gives exception with message cannot find plugin.xml for corodova-plugin-geolocation while I already uninstalled the plugin and that is not listed by corodova plugin list
the code is a mess could have been far productive develop in native platform with the time it is taking to trace out issues, debugging, build time…