Hello I downloaded and installed node.js as I have done million times also I installed cordova as mentioned in their docs. Furthermore I installed console.plugin with "cordova plugin add org.apache.cordova.console". Finally I did cordova build android and the cordova emulate android, and inside www/js/index.js onDeviceReady I simply entered this console.log('test');
I'm new with cordova and I cant figure out why I dont see and output in my terminal.
PS: I'm on ubuntu 12.04 LTS 64bit, and I dont use eclipse. Shouldn't I see the console.log output in my terminal window ?
From the CLI run your Android project and display console output from chromium (if using Crosswalk) or SystemWebViewClient. View Debugging priority and above logs from these places, and silence everything else.
cordova run android && adb logcat chromium:D SystemWebViewClient:D *:S
Using alert()
is a rather dilettantish debug methodology. The most simple is to use a hardware device or an emulator with adb
and chrome://inspect
. This provides the debug bridge for the Cordova WebView
, as well as the JS console, JS debugger, DOM inspector, etc. within Chrome.
See Get Started with Remote Debugging Android Devices.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With