mauron85 / cordova-plugin-background-geolocation-example

51 stars 54 forks source link

cordova run android --device - app.js #8

Open Jahrenski opened 6 years ago

Jahrenski commented 6 years ago

I tried to run the demo on my android device but it gives me an error. Failed to load resource: net::ERR_FILE_NOT_FOUND app.js

npm i npm run build

cordova platform add android cordova plugin add cordova-plugin-mauron85-background-geolocation cordova build android

cordova run android --device

blank page.

Jahrenski commented 6 years ago

Just add in the documentation that you need to run npm run compile after you run npm run build

Then it works.

mauron85 commented 6 years ago

npm run build will run npm compile itself. Not sure why you have this problem.

Jahrenski commented 6 years ago

I'm running from windows.

I had to change the script build line from _"npm run clean && npm run copy && NODEENV=production npm run compile" to _"npm run clean && npm run copy && SET NODEENV=production npm run compile"

I guess that part didn't work on its own.

mauron85 commented 6 years ago

oh in case of windows you're probably right. probably it failed becuase of missing SET. that explains why you had to run npm run compile as additional step.