简体   繁体   English

CLI中的Ionic build android什么都不做

[英]Ionic build android in CLI does nothing

I really tried to avoid having to ask this question but I've been stuck on this for a good two days. 我真的试图避免不得不提出这个问题,但我已经坚持了两天。 The problem is that when I try to run the command " ionic build android " I get nothing. 问题是,当我尝试运行命令“ ionic build android ”时,我什么也得不到。 No error response, no warning, nothing. 没有错误响应,没有警告,没有。

I installed node.js and made my npm global so I can access it anywhere. 我安装了node.js并使我的npm全局,所以我可以在任何地方访问它。 I installed ionic and cordova via npm install and I was able to start the application and see it on the web but when I try to run it on my device, I don't get any response at all. 我通过npm install安装了ionic和cordova,我能够启动应用程序并在网上看到它,但是当我尝试在我的设备上运行它时,我根本没有得到任何响应。

What am I missing? 我错过了什么? I have all the android sdks as I normally write my android applications natively. 我有所有的android sdks,因为我通常在本地编写我的android应用程序。 I installed Ant view homebrew. 我安装了Ant view homebrew。 I'm quite lost. 我很失落。

Apparently there was a bug in Node 5.0.0 causing this. 显然,Node 5.0.0中存在一个导致此问题的错误

I had the same issue as you, remedy, and was able to resolve it today by updating to the latest version of node (5.2.0 as of today): 我遇到了与您相同的问题,通过更新到最新版本的节点(截至今天的5.2.0)来解决问题。

sudo npm update -g

For some reason not (yet) known to me, the cordova command was no longer available after this update (returning " /usr/local/bin/cordova: No such file or directory "), but reinstalling cordova by calling 由于某些原因(我还不知道),此更新后cordova命令不再可用(返回“ /usr/local/bin/cordova: No such file or directory ”),但是通过调用重新安装cordova

sudo npm install -g cordova

helped. 帮助。 After these two updates the ionic build ... and cordova build ... commands worked again. 在这两次更新之后, ionic build ...cordova build ...命令再次起作用。

So downgrading node to version 4 is apparently no longer necessary to resolve this. 因此,显然不再需要将节点降级到版本4来解决此问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM