简体   繁体   中英

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>

Just a point to look at:

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

should be:

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

You wrote Jqury , there is an e missing.

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM