富百世 2019-11-01 21:17 采纳率: 0%
浏览 985
已结题

运行ionic cordova platform add android不成功

各位大神:
在运用Ionic 开发手机APP的过程中遇到困难,ionic安装的是最新的长期支持版的,cordova安装的也是最新版的,但在运行ionic start shop tabs后,再运行ionic cordova platform add android为项目增加Android平台支持不成功,命令行窗口出现如下:
C:\Users\WangQitong\jdshop>ionic cordova platform add android

C:\Users\WangQitong\jdshop>"node" "C:\Users\WangQitong\AppData\Roaming\npm\node_modules\ionic\bin\ionic" cordova platform add android

cordova.cmd platform add android

C:\Users\WangQitong\jdshop>"node" "C:\Users\WangQitong\AppData\Roaming\npm\node_modules\cordova\bin\cordova" "platform" "add" "android"
Using cordova-fetch for cordova-android@^8.0.0
Failed to fetch platform cordova-android@^8.0.0
Probably this is either a connection problem, or platform spec is incorrect.
Check your connection and platform name/version/URL.
Error: npm: Command failed with exit code 4294963238 Error output:
npm WARN rm not removing C:\Users\WangQitong\jdshop\node_modules.bin\webdriver-manager.cmd as it wasn't installed by C:\Users\WangQitong\jdshop\node_modules\webdriver-manager
npm WARN rm not removing C:\Users\WangQitong\jdshop\node_modules.bin\webdriver-manager as it wasn't installed by C:\Users\WangQitong\jdshop\node_modules\webdriver-manager
npm WARN rm not removing C:\Users\WangQitong\jdshop\node_modules.bin\webdriver-manager.cmd as it wasn't installed by C:\Users\WangQitong\jdshop\node_modules_webdriver-manager@12.1.7@webdriver-manager
npm WARN rm not removing C:\Users\WangQitong\jdshop\node_modules.bin\webdriver-manager as it wasn't installed by C:\Users\WangQitong\jdshop\node_modules_webdriver-manager@12.1.7@webdriver-manager
npm WARN webpack-dev-middleware@3.7.2 requires a peer of webpack@^4.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN The package @angular/compiler is included as both a dev and production dependency.

npm ERR! code ENOENT
npm ERR! syscall rename
npm ERR! path C:\Users\WangQitong\jdshop\node_modules_brace-expansion@1.1.11@brace-expansion\node_modules\balanced-match
npm ERR! dest C:\Users\WangQitong\jdshop\node_modules_brace-expansion@1.1.11@brace-expansion\node_modules\balanced-match
npm ERR! errno -4058
npm ERR! enoent ENOENT: no such file or directory, rename 'C:\Users\WangQitong\jdshop\node_modules_brace-expansion@1.1.11@brace-expansion\node_modules\balanced-match' -> 'C:\Users\WangQitong\jdshop\node_modules_brace-expansion@1.1.11@brace-expansion\node_modules\balanced-match'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\WangQitong\AppData\Roaming\npm-cache_logs\2019-11-01T12_41_07_880Z-debug.log

ionic cordova resources android --force
cordova-res.cmd android
[cordova-res]
[cordova-res] C:\Users\WangQitong\jdshop>"node" "C:\Users\WangQitong\AppData\Roaming\npm\node_modules\cordova-res\bin\cordova-res" "android"
[cordova-res] Generated 18 resources for android
[cordova-res] Wrote to config.xml

请问是什么原因呢?

  • 写回答

1条回答 默认 最新

报告相同问题?

悬赏问题

  • ¥15 YoloV5 第三方库的版本对照问题
  • ¥15 请完成下列相关问题!
  • ¥15 drone 推送镜像时候 purge: true 推送完毕后没有删除对应的镜像,手动拷贝到服务器执行结果正确在样才能让指令自动执行成功删除对应镜像,如何解决?
  • ¥15 求daily translation(DT)偏差订正方法的代码
  • ¥15 js调用html页面需要隐藏某个按钮
  • ¥15 ads仿真结果在圆图上是怎么读数的
  • ¥20 Cotex M3的调试和程序执行方式是什么样的?
  • ¥20 java项目连接sqlserver时报ssl相关错误
  • ¥15 一道python难题3
  • ¥15 牛顿斯科特系数表表示