在cordova项目中添加平台时出错

时间:2017-12-13 09:53:05

标签: android node.js cordova ubuntu

我在Cordova项目上创建了但是在添加平台时它给了我以下错误:

dev@dny:~/AngularCordova/13_12_2017/myApp$ cordova platform add android

使用cordova-fetch for cordova-android@~6.3.0

错误:

Failed to fetch platform cordova-android@~6.3.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 1 Error output:
npm ERR! code E404
npm ERR! 404 Not Found: cordova-android@~6.3.0

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/dny/.npm/_logs/2017-12-13T09_52_01_436Z-debug.log

1 个答案:

答案 0 :(得分:0)

npm install -g android@latest

为我解决了这个问题。

还更新了与android Cordova一起使用的

'npm install -g cordova-android'