Syd Syd - 1 year ago 138
Android Question

Cordova console.log not working

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


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 ?

Answer Source

The output will appear in an output window, not in the terminal window.

I run my Android Cordova apps in Eclipse and logs appear in the Logcat output window, similarly with iOS apps and Xcode, they appear in the Xcode output window.

You could always just alert() or navigator.notification.alert() to quickly see your logged values.

Hope this helps.