简体   繁体   中英

Ionic - 'platform add android' Comand failed with exit code ENOENT

Please help me get my Windows 8/Ionic/Cordova/Android environment setup correctly.

I'm trying to use the command 'add platform android' but am unable to get it to work. I have seen similar posts to this but none quite the same.

I've tried un-installing Cordova and Ionic and reinstalling them as recommended here http://tinyurl.com/ogxb8u5 but it has no effect.

Heres是命令的输出 I assumed my environment variables are OK because ant, android , java and node commands are working fine, as are Cordova and ionic, as seen in the tests below.

在此输入图像描述

Sorry don't have enough privilege to comment on your question. I had faced similar issue. run this command before adding android platform,

C:\\your\\Directory>npm link cordova

C:\\your\\Directory>npm link ionic

then go for,

C:\\your\\Directory>ionic platform add android

hope this helps!

我有类似的问题,以管理员身份运行节点解决了我的问题。

  • Go back to your cd
  • type: bower--install-dev platform
  • Type: cordova platform add android (not ionic run) I did it, it works here.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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