Window.cordova undefined

Hi,

I’m using visual studio with tools for apache cordova.
In a clean template project when I deploy to device, cordova plugins works fine, but if I send the generated .APK to other device window.cordova is undefined and cordova plugins doesn’t work. Same occur with android emulator. If I clean project and then build&deploy to emulator cordova plugins works! This means that I need to clean project every time and creat several .APKs for each device?

No something might be wrong with your setup. Same thing happened to me.
Clear your npm cache and update your cordova and ionic cli. Then try with a fresh install.

I’ll try that, but supposedly “update your cordova and ionic cli” should not be necessary because Visual studio’s tools for apache cordova handle all the necessary configs