Ionic Cordova平台安装错误

时间:2018-05-28 14:21:21

标签: android cordova ionic-framework

我一直在尝试使用Ionics CLI重新生成所有图标和启动图像。所以我不得不安装IOS和Android平台,我安装了IOS,但安装android一直给我一个问题。这是我在终端中运行此行后得到的内容。任何帮助将不胜感激。

  

离子cordova平台添加android

Discovered plugin "cordova-plugin-email-composer" in config.xml. Adding it to the project

Failed to restore plugin "cordova-plugin-email-composer" from config.xml. You might need to try adding it again. Error: Failed to fetch plugin https://github.com/katzer/cordova-plugin-email-composer.git#0.8.2 via registry.
Probably this is either a connection problem, or plugin spec is incorrect.
Check your connection and plugin name/version/URL.
Error: npm: Command failed with exit code 1 Error output:
npm ERR! code ENOPACKAGEJSON
npm ERR! package.json Non-registry package missing package.json: git+https://github.com/katzer/cordova-plugin-email-composer.git#0.8.2.
npm ERR! package.json npm can't find a package.json file in your current directory.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/Fin/.npm/_logs/2018-05-28T14_07_22_673Z-debug.log

Discovered plugin "com.rjfun.cordova.iad" in config.xml. Adding it to the project
Failed to restore plugin "com.rjfun.cordova.iad" from config.xml. You might need to try adding it again. Error: Failed to fetch plugin com.rjfun.cordova.iad@^2.0.4 via registry.
Probably this is either a connection problem, or plugin spec is incorrect.
Check your connection and plugin name/version/URL.
Error: npm: Command failed with exit code 1 Error output:
npm ERR! code E404
npm ERR! 404 Not Found: com.rjfun.cordova.iad@^2.0.4

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/Fin/.npm/_logs/2018-05-28T14_07_31_437Z-debug.log

Running command: /Users/Fin/fflow/hooks/after_prepare/010_add_platform_class.js /Users/Fin/fflow

Running command: /Users/Fin/fflow/hooks/after_prepare/020_remove_sass_from_platforms.js /Users/Fin/fflow

--save flag or autosave detected
Saving android@~7.0.0 into config.xml file ...
[ERROR] Exception: 
--save flag or autosave detected
Saving android@~7.0.0 into config.xml file ...
[ERROR] Exception: 

1 个答案:

答案 0 :(得分:0)

删除旧平台,然后安装新平台

cordova platform remove android

cordova platform add android@7.1.0