fubaishi
富百世
采纳率77.8%
2019-11-01 21:17 阅读 827

运行ionic cordova platform add android不成功

20

各位大神:
在运用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条回答 默认 最新

相关推荐