[英]Cordova plugin installation is not working
我正在嘗試安裝此插件:
https://github.com/wnyc/cordova-plugin-playerhater
所以我執行這個命令
cordova plugin add https://github.com/wnyc/cordova-plugin-playerhater.git
並將其添加到config.xml
<gap:plugin name="org.nypr.cordova.playerhaterplugin" version="0.1.0" />
之后,我嘗試:
alert(window.audioplayer); //undefined
alert(window.cordova.plugins); //{"fileextras":{}, "barcodeScanner":{...}}
alert(window.cordova.plugins.audioplayer); //undefined
如何使該插件正常工作?
首先,命令是:
cordova local plugin add https://github.com/wnyc/cordova-plugin-playerhater.git
因此它沒有正確地添加pulgin,我建議你遵循的方法安裝pulgin,不要在config.xml中手動添加任何代碼。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.