[英]Using plugins with Cordova CLI
我正在使用Cordova CLI(v6.0.0)為Android制作應用程序,我無法加載插件:cordova-plugin-file和cordova-plugin-dialogs。 我知道它,因為顯示下一個警報:
if (!navigator.notification)
alert("Plugin notification not working properly!");
if (!window.requestFileSystem)
alert("Plugin file not working properly!");
單擊按鈕后(而不是ondeviceready事件之前)使用插件。 已安裝插件:
cordova-plugin-file v.1.2.0
cordova plugin add cordova-plugin-file
cordova-plugin-dialogs v4.1.0
cordova plugin add cordova-plugin-dialogs
我還在config.xml中添加了下一行
<preference name="AndroidPersistentFileLocation" value="Compatibility" />
我做錯了什么?
主html文件中的下一行丟失了:
<script type="text/javascript" src="cordova.js"></script>
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.