“cordova platform add android” shasum错误 [英] "cordova platform add android" shasum error

查看:107
本文介绍了“cordova platform add android” shasum错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在设置和HelloWorld示例在
http://cordova.apache.org/docs/en/3.5.0//guide_cli_index.md.html#The%20Command-Line%20Interface $ b Debian的稳定,并在命令运行到一个问题

I'm working through the setup and HelloWorld example at http://cordova.apache.org/docs/en/3.5.0//guide_cli_index.md.html#The%20Command-Line%20Interface on Debian Stable and running into a problem at the command

cordova platform add android

输出错误信息是:

npm http GET https://registry.npmjs.org/cordova-android/-/cordova-android-3.6.1.tgz
Unable to fetch platform android: Error: shasum check failed for .../tmp/npm-29259-W2mnHZlo/1410473956287-0.27467933809384704/tmp.tgz
Expected: b9138a0743c4f424ee62721c22dac84e8d1ca087
Actual:   a5c74dea5a0225566e4a54185d8639a7f7f6ac3e

我尝试使用wget获取
cordova-android-3.6.1.tgz
,但

I tried using wget to fetch cordova-android-3.6.1.tgz , but

shasum cordova-android-3.6.1.tgz

返回相同的a5c ...校验和。我在浏览器中查看
registry.npmjs.org/cordova-android
,它确实指定了b91 ...校验和。

returns the same a5c... checksum as above. I looked at registry.npmjs.org/cordova-android in a browser, and it does specify the b91... checksum.

所以,这是一个错误,还是有一个设置,改变如何计算shasum? (shasum的-a选项更改输出,但没有值产生匹配)。

So, is this a bug, or is there a setting that changes how the shasum is computed? (the -a option of shasum changes the output, but none of the values produce a match).

12sep2014:谢谢。两个答案都工作,但我没有足够的声誉来提升他们。

12sep2014: Thanks. Both answers worked, but I don't have enough reputation to upvote them. I somewhat arbitrarily selected the longer answer as the "official" correct one.

另一个解决方法是找到的是usegit选项:

Another workaround I found is the usegit option:

cordova platform --usegit add android


推荐答案

这是包装最新cordova软件包的NPM分布错误 - 显然与 https://github.com/npm/npm/issues/5414

It was an error in packaging the NPM distribution of the latest cordova packages -- apparently related to https://github.com/npm/npm/issues/5414

作为解决方法,您可以解开cordova-android并运行命令

As a workaround, you can untar the cordova-android package that you downloaded, and run the command

cordova platform add <path_to_cordova_android>

官方软件包的SHA-1校验和在apache.org( https://dist.apache.org/repos/dist/release/ cordova / platforms / cordova-android-3.6.1.tgz )匹配你发现的,所以这不是一个问题的文件损坏在npm,只是一个错误在发布

The SHA-1 checksum of the official package at apache.org (https://dist.apache.org/repos/dist/release/cordova/platforms/cordova-android-3.6.1.tgz) does match what you've found, so it's not an issue of file corruption at npm, just a error in the publishing process.

这篇关于“cordova platform add android” shasum错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆