Search code examples
cordovacordova-pluginsphonegapcordova-3cordova-2.0.0

deviceReady event not fired


I am new to cordova and i am trying to get device id from deviceReady event which is not firing, after googling i got to know that i need reference Cordova.js file in my project so i did. after cordova.js included i am keep getting Uncaught module cordova/channel not found error, i tried adding channel.js and utils.js but keep on getting other errors. Please can someone help me to fix it.

 <script type="text/javascript" src="js/Jqury.js"></script>
    <script type="text/javascript" src="require.js"></script>

    <!--<script type="text/javascript" src="utils.js"></script>
    <script type="text/javascript" src="channel.js"></script>-->

    <script type="text/javascript" src="cordova.js"></script>


    <script type="text/javascript" src="js/index.js"></script>
    <script type="text/javascript" src="js/bootstrap.js"></script>


Solution

  • After many googling hours i found right place to solve the issue, i got to know that i don't need to add cordova.js file physically to my project and it will automatically gets added at compile time, we just need to make sure reference exists in index.html file.