tnblog
首页
视频
资源
登录
不帅~~但是很暖心.....
排名
6
文章
6
粉丝
16
评论
8
{{item.articleTitle}}
{{item.blogName}} : {{item.content}}
ICP备案 :渝ICP备18016597号-1
网站信息:2018-2024TNBLOG.NET
技术交流:群号656732739
联系我们:contact@tnblog.net
欢迎加群交流技术

ionic cordova platform add android报错

5461人阅读 2021/5/11 8:26 总访问:287963 评论:0 收藏:0 手机
分类: ionic

ionic各种环境以及配置完但是添加平台报错:

Using cordova-fetch for anroid

Failed to fetch platform anroid

Probably this is either a connection problem, or platform spec is incorrect.

Check your connection and platform name/version/URL.

CordovaError: Error: npm: Command failed with exit code 1 Error output:

npm ERR! code E404

npm ERR! 404 Not Found - GET https://registry.npmjs.org/anroid - Not found

npm ERR! 404

npm ERR! 404  'anroid@latest' is not in the npm registry.

npm ERR! 404 You should bug the author to publish it (or use the name yourself!)

npm ERR! 404

npm ERR! 404 Note that you can also install from a

npm ERR! 404 tarball, folder, http url, or git url.


npm ERR! A complete log of this run can be found in:

npm ERR!     C:\Users\Sin\AppData\Roaming\npm-cache\_logs\2021-05-11T00_17_48_847Z-debug.log

[ERROR] An error occurred while running subprocess cordova.


        cordova.cmd platform add anroid exited with exit code 1.


        Re-running this command with the --verbose flag may provide more information.

解决办法:

一、先查看一下有没有设置代理

npm config get proxy
npm config get https-proxy

以上两个命令如果返回null,那么就不需要执行以下命令清理

npm config set https-proxy nullnpm config set proxy null

二、重新设置

npm config set registry https://registry.npmjs.org/

 

继续执行其他命令检测是否成功!


评价