You need the debug console plugin added to your project:
phonegap local plugin add https://git-wip-us.apache.org/repos/asf/cordova-plugin-console.git
In later versions of phonegap/cordova, to add the debug console plugin in your project:
cordova plugin add org.apache.cordova.console
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…