cordova 直接安装插件超时,使用npm安装

在Mac上遇到Cordova直接安装插件出现超时问题,采用npm全局安装插件的方法解决。分别安装了device、statusbar、file和file-transfer插件,并对每个插件进行了安卓和iOS平台的添加。安装过程中,针对Android存储位置的变化,提示可能需要在config.xml中进行配置更新以兼容旧版应用。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

MacBook-Pro:cordova jingangbao$ npm install -g cordova-plugin-device

cordova-plugin-device@1.1.3 /usr/local/lib/node_modules/cordova-plugin-device

MacBook-Pro:cordova jingangbao$ npm install -g cordova-plugin-statusbar

cordova-plugin-statusbar@2.2.0 /usr/local/lib/node_modules/cordova-plugin-statusbar

MacBook-Pro:cordova jingangbao$ npm install -g cordova-plugin-file

cordova-plugin-file@4.3.0 /usr/local/lib/node_modules/cordova-plugin-file

MacBook-Pro:cordova jingangbao$ npm install -g cordova-plugin-file-transfer

cordova-plugin-file-transfer@1.6.0 /usr/local/lib/node_modules/cordova-plugin-file-transfer


MacBook-Pro:cordova$ cordova plugin add /usr/local/lib/node_modules/cordova-plugin-device

Installing "cordova-plugin-device" for android

Installing "cordova-plugin-device" for ios

MacBook-Pro:cordova$ cordova plugin add /usr/local/lib/node_modules/cordova-plugin-statusbar

Installing "cordova-plugin-statusbar" for android

Installing "cordova-plugin-statusbar" for ios

MacBook-Pro:cordova$ cordova plugin add /usr/local/lib/node_modules/cordova-plugin-file

Installing "cordova-plugin-file" for android

The Android Persistent storage location now defaults to "Internal". Please check this plugins README to see if you application needs any changes in its config.xml.

If this is a new application no changes are required.

If this is an update to an existing application that did not specify an "AndroidPersistentFileLocation" you may need to add:

      "<preference name="AndroidPersistentFileLocation" value="Compatibility" />"

to config.xml in order for the application to find previously stored files.

Installing "cordova-plugin-file" for ios

The Android Persistent storage location now defaults to "Internal". Please check this plugins README to see if you application needs any changes in its config.xml.

If this is a new application no changes are required.

If this is an update to an existing application that did not specify an "AndroidPersistentFileLocation" you may need to add:

      "<preference name="AndroidPersistentFileLocation" value="Compatibility" />"

to config.xml in order for the application to find previously stored files.  

MacBook-Pro:cordova$ cordova plugin add /usr/local/lib/node_modules/cordova-plugin-file-transfer

Installing "cordova-plugin-file-transfer" for android

Installing "cordova-plugin-file-transfer" for ios

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值