I have a dead simple Cordova app with a single plugin: org.apache.cordova.file.
When I emulate the app in an android emulator, the deviceready event is never fired, and I get this as an output:
D/CordovaLog( 1841): file:///android_asset/www/cordova.js: Line 1154 : deviceready has not fired after 5 seconds.
D/CordovaLog( 1841): file:///android_asset/www/cordova.js: Line 1147 : Channel not fired: onFileSystemPathsReady
Some additional information:
cordova --version
3.5.0-0.2.4
javac -version
javac 1.7.0_55
java -version
java version "1.7.0_55"
OpenJDK Runtime Environment (IcedTea 2.4.7) (7u55-2.4.7-1~deb7u1)
OpenJDK 64-Bit Server VM (build 24.51-b03, mixed mode)
index.html:
<!doctype html>
<html>
    <head>
    </head>
    <body>
        <script src='cordova.js' type='text/javascript'></script>
        <script src='index.js' type='text/javascript'></script>
    </body>
</html>
index.js:
(function() {
    "use strict";
    document.addEventListener("deviceready", function() {
        console.log("Ready");
    }, false);
}());
Is the Cordova File plugin broken? Am I doing something wrong? Has anyone else come across this issue and found a solution?
Try installing the 1.1.0 version of the file plugin. Updating to 1.2.0 was a bad idea.
cordova plugin add [email protected]
This made the job for me on Android (and on iOS I stopped having other exotic problems).
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