cordova platform add android 国内慢
Cordova报错:
E:\study\cordova\eppdemo>cordova platform add ios WARNING: Applications for platform ios can not be built on this OS - win32. npm http GET https://registry.npmjs.org/cordova-ios npm http GET https://registry.npmjs.org/cordova-ios npm http GET https://registry.npmjs.org/cordova-ios Unable to fetch platform ios: Error: connect ETIMEDOUT
解决方案:
切换为国内npm源
http://npm.taobao.org/
$ npm install -g cnpm --registry=https://registry.npm.taobao.org
安装nrm
E:\study\cordova\eppdemo>nrm ls npm ---- https://registry.npmjs.org/ * cnpm --- http://r.cnpmjs.org/ taobao - http://registry.npm.taobao.org/ edunpm - http://registry.enpmjs.org/ eu ----- http://registry.npmjs.eu/ au ----- http://registry.npmjs.org.au/ sl ----- http://npm.strongloop.com/ nj ----- https://registry.nodejitsu.com/ pt ----- http://registry.npmjs.pt/ E:\study\cordova\eppdemo>nrm use taobao Registry has been set to: http://registry.npm.taobao.org/ E:\study\cordova\eppdemo>nrm ls npm ---- https://registry.npmjs.org/ cnpm --- http://r.cnpmjs.org/ * taobao - http://registry.npm.taobao.org/ edunpm - http://registry.enpmjs.org/ eu ----- http://registry.npmjs.eu/ au ----- http://registry.npmjs.org.au/ sl ----- http://npm.strongloop.com/ nj ----- https://registry.nodejitsu.com/ pt ----- http://registry.npmjs.pt/
成功:
E:\study\cordova\eppdemo>cordova platform add android npm http GET http://registry.npm.taobao.org/cordova-android npm http 200 http://registry.npm.taobao.org/cordova-android npm http GET http://registry.npm.taobao.org/cordova-android npm http 200 http://registry.npm.taobao.org/cordova-android npm http GET http://registry.npm.taobao.org/cordova-android/download/cordova-android-4.0.2.tg npm http 200 http://registry.npm.taobao.org/cordova-android/download/cordova-android-4.0.2.tg Adding android project... Creating Cordova project for the Android platform: Path: platforms\android Package: com.deppon.epp Name: HelloCordova Activity: MainActivity Android target: android-22 Copying template files... Android project created with [email protected] Discovered plugin "cordova-plugin-whitelist" in config.xml. Installing to the project Fetching plugin "cordova-plugin-whitelist@1" via npm npm http GET http://registry.npm.taobao.org/cordova-plugin-whitelist npm http 200 http://registry.npm.taobao.org/cordova-plugin-whitelist npm http GET http://registry.npm.taobao.org/cordova-plugin-whitelist/download/cordova-plugin- st-1.0.0.tgz npm http 200 http://registry.npm.taobao.org/cordova-plugin-whitelist/download/cordova-plugin- st-1.0.0.tgz Installing "cordova-plugin-whitelist" for android E:\study\cordova\eppdemo>npm install -g ionic
相关推荐
绿豆饼 2020-07-28
malonely 2020-07-20
liujia 2020-06-02
chenxiangpeng 2020-04-30
kfq00 2020-04-10
malonely 2020-01-19
liujia 2019-12-27
chunianyo 2019-12-14
kfq00 2014-06-30
朱莉的乔夫 2015-03-26
kehongyong 2015-05-12
Go贝壳 2015-06-14
莫封洛 2015-06-13
shichong 2015-05-14
MonkeyKingBi 2015-10-30
百度通告 2015-12-26
welldum 2019-09-07
inyiyi 2018-09-05