I finally realized that the error was due to the EventListener
for deviceready
. I changed
if ('device is android') {
document.addEventListener("deviceready", this.onDeviceReady(), false);
}
to
document.addEventListener("deviceready", this.onDeviceReady, false);
and everything fell right into place. Though this is a careless mistake, I still leave this question and it's answers for others who might encounter this issue
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…