富百世 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条回答

报告相同问题?

悬赏问题

  • ¥50 buildozer打包kivy app失败
  • ¥30 在vs2022里运行python代码
  • ¥15 不同尺寸货物如何寻找合适的包装箱型谱
  • ¥15 求解 yolo算法问题
  • ¥15 虚拟机打包apk出现错误
  • ¥15 用visual studi code完成html页面
  • ¥15 聚类分析或者python进行数据分析
  • ¥15 三菱伺服电机按启动按钮有使能但不动作
  • ¥15 js,页面2返回页面1时定位进入的设备
  • ¥50 导入文件到网吧的电脑并且在重启之后不会被恢复