Cordova + ionic 0.9.23 'device plugin required'


#1

On ionic.js line 1801, it complaints about

‘device plugin required’

everytime, i dit some research, and it seems to be something related to the onCordovaInfoReady event never firing.

any ideas?


#2

Run this and then run your build again:

cordova plugin add org.apache.cordova.device


#3

already tried, error still shows


#4

Can you try entering ‘cordova plugin’ in the directory of your project and note the output?

It should have a line saying 'org.apache.cordova.device'.


#5

yes, i have:

[ ‘org.apache.cordova.device’ ]


#6

cordova is up-to-date?
Have you removed the plugin and add it again?


#7

cordova -version
3.3.1-0.4.1

yes, tried removing the plugin and re-adding, plugin works fine without ionic


#8

have you tried the nightly ionic build?


#9

Which code are you using that leads to the error ‘device plugin required’? Are you using ionicPlatform.ready?


#10

i´m not using any code, ionic breaks by itself…

ionic handles ‘deviceready’ by itself, it fails for some reason when it tries to detect isCordova(), therefore complaining about the plugin


#11

Are you using this in your browser, simulator or device?


#12

simulator and device


#13

Have you used cordova build ios before running it in the simulator? You need to be doing that every time you add / remove plugins or change code.


#14

yes i did, i can access on a webpage that does not use ionic by setting the deviceready and then using the plugins variables


#15

Have you tried including cordova.js in your page before ionic?


#16

Make sure your config.xml includes this line:

<feature name="http://api.phonegap.com/1.0/device" />


#17

Depending on platform, that may be required. If Android, then yes. If iOS , then no.


#18

I´m getting same problem here


#19

i have the same problem here as well. tried also remove and add and still the same error. with ionic 0.9.21 it wasn’t


#20

Did you use the ionic cli?