ionic cordova platform add android 报错处理;(2)

报错现象 如下

wpz@DESKTOP-P6L1J91 MINGW64 ~/Desktop/app/peiping (wangpinzhou)
$ ionic cordova platform add android
> cordova platform add android --save
Using cordova-fetch for cordova-android@7.0.0

Error: Failed to fetch platform cordova-android@7.0.0
Probably this is either a connection problem, or platform spec is incorrect.
Check your connection and platform name/version/URL.
Error: cmd: Command failed with exit code 1 Error output:
npm ERR! Maximum call stack size exceeded

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\wpz\AppData\Roaming\npm-cache\_logs\2018-05-22T02_39_18_944Z-debug.log

[ERROR] Exception:
 

处理

删除 cordova缓存 文件C:\Users\wpz.cordova\lib\npm_cache

删除 及 重装对应的版本;


npm remove cordova -g  

npm install cordova@版本号 // 最后和项目的环境一致

增加平台

ionic cordova platform add android 
posted @ 2018-05-31 14:58  wangpinzhou  阅读(346)  评论(0)    收藏  举报