Cordova plugins not working

前端 未结 3 2000
北海茫月
北海茫月 2020-12-05 15:08

Edit for clarification: The you see in some of the files below is not actually part of the files, but it includes the company name

3条回答
  •  难免孤独
    2020-12-05 16:05

    Checklist: Is your plugin loaded?

    • Does your index.html load the cordova.js script? (i.e. if you have www/index.html then you can just reference cordova.js. This file is not in the www directory, but automatically generated by Cordova and inserted in your app)
    • Is the plugin javascript loaded? Use Chrome or Safari to remote debug your android/iOS app.
    • cordova plugin ls: Is your plugin listed?
    • plugins/android.json: Is your plugin listed?
    • Does platforms/android/assets/www have all files? (i.e. a plugins folder with scripts, cordova_plugins.js should mention your plugin, a platform-specific cordova.js)

    Can you listen to the deviceready event to check if Cordova initializes at all? (If all scripts are in place)

提交回复
热议问题