Console logs / Debug -
Phone Gap / Cordova



, debug

cordova plugin console



:
cordova plugin add cordova-plugin-console

index.js function onDeviceReady

:
console.log("console.log works well");
.

-----------------------------------------------------------------------
Google Chrome Console
-----------------------------------------------------------------------

R.CLick Inspect " Ctrl+ Shift+I "

console



.

cordova.js :

:
index.html:26 GET file:///C:/riseapp/risecordova/app1/www/cordova.js net::ERR_FILE_NOT_FOUND
you can not test your application on chrome. cordova.js file will be embedded after building the project. try building and deploying your app on the device or emulator.
cordova.js www app1\platforms\android\platform_www
build apk


if you want to avoid these errors goto /platforms folder. after building the project all your files and a copy of cordova.js are there. if you open your applications main page form that folder you wont get file not found error.

:
<script src="cordova.js"></script>
When you run cordova platform add android and then cordova build android, you should get a cordova.js added project/platforms/android/assets/www folders. You don't need to add it in your js files. so, just declare it in index.js file as follows,
:
CSP Content Security Policy -


:

https://cordova.apache.org/docs/en/l...ole/index.html
https://stackoverflow.com/questions/...dova-js-errors
https://stackoverflow.com/questions/...d-in-ionic-app