1

我正在尝试在 Windows 8 上运行 calabash-android。我已经安装了 Ruby 2.0.0 并添加了以下路径(系统变量):

ANDROID_HOME = C:\Development\adt-bundle-windows-x86_64-20130219\adt-bundle-windows-x86_64-20130219\sdk
ANT_HOME = C:\Program Files\apache-ant-1.9.0-src\apache-ant-1.9.0\apache-ant-1.9.0-bin\apache-ant-1.9.0
JAVA_HOME = C:\Program Files\Java\jdk1.7.0_21
Path = C:\Ruby200-x64\bin; C:\Program Files\apache-ant-1.9.0-src\apache-ant-1.9.0\apache-ant-1.9.0-bin\apache-ant-1.9.0\bin

为什么我在命令行中输入 calabash-android run NetPocoCache.apk 不起作用?我收到以下错误:

C:\Users\Anna\workspace\NetPocoCache\bin>calabash-android run NetPocoCache.apk -v No test server found for this combination of this app and calabash version. 重新创建测试服务器。2013-05-13 12:01:12 - "C:\Program Files\Java\jdk1.7.0_21/bin/keytool.exe" -v -list -alias androiddebugkey -keystore "C:/Users/Anna/.android /debug.keys tore" -storepass android 2013-05-13 12:01:12 - Aliasnamn: androiddebugkey Skapat den: 2013-maj-13 Posttyp: PrivateKeyEntry Lõngd pÕ certifikatskedja: 1 Certifikat[1]: ─gare: CN=Android Debug, O=Android, C=US Utfõrdare: CN=Android Debug, O=Android, C=US Serienummer: 2d0236c8 Giltigt 日期: Mon May 13 10:33:24 CEST 2013 until: Wed May 06 10:33:24 CEST 2043 Certifikatets fingeravtryck: MD5: 02:35:0D:D6:DA:3A:7D:B1:C7:29:43:B2:77:91:6F:48 SHA1: C2:45:61:B9:66: 58:D6:

蒂尔格:

1: ObjectId: 2.5.29.14 Criticality=false SubjectKeyIdentifier [ KeyIdentifier [ 0000: 3F 74 AD 07 92 A3 17 06 9E C0 AF 19 DC E4 E1

3D ?t.............= 0010: 24 AA 97 24
$..$ ] ]

2013-05-13 12:01:12 - 密钥库的 MD5 指纹(“C:/Users/Anna/.android/debug.keystore”):02:35:0D:D6:DA:3A:7D:B1:C7 :29:43:B2:77:91:6F:48 2013-05-13 12:01:12 - "C:\Program Files\Java\jdk1.7.0_21/bin/keytool.exe" -v -printcert -文件 C:/Users/Anna/AppData/Local/Temp/d20130513-2828-sej8xs/M ETA-INF/CERT.RSA 2013-05-13 12:01:12 - ─gare: CN=Android Debug, O=Android , C=US Utfõrdare: CN=Android Debug, O=Android, C=US Serienummer: 2d0236c8 Giltigt frÕn den: Mon May 13 10:33:24 CEST 2013 until: Wed May 06 10:33:24 CEST 2043 Certifikatets fingeravtryck: MD5: 02:35:0D:D6:DA:3A:7D:B1:C7:29:43:B2:77:91:6F:48 SHA1: C2:45:61:B9:66:58:D6:4A :9D:F8:A4:AF:14:9B:EA:F5:23:81:47:E8 SHA256: 9F:82:C4:B1:B3:44:4A:7E:F3:44:8B:AD: 7A:E5:07:30:F6:72:C5:EA:8E:C8:34:D9:F5:29:F5:F3:4C:92:0E:03 Namn pÕ 签名算法:SHA256withRSA 版本:3

蒂尔格:

1: ObjectId: 2.5.29.14 Criticality=false SubjectKeyIdentifier [ KeyIdentifier [ 0000: 3F 74 AD 07 92 A3 17 06 9E C0 AF 19 DC E4 E1

3D ?t.............= 0010: 24 AA 97 24
$..$ ] ]

2013-05-13 12:01:12 - 用于签署证书的 MD5 指纹(C:/Users/Anna/workspace/NetPocoCache/bin/NetPocoCache.apk):02:35:0D:D6:DA:3A:7D:B1 :C7:29:43:B 2:77:91:6F:48 C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/calabash-android-0.4.4/lib/calabash-android/ helpers.rb:29:in `': No such file or directory - java -jar "C:/Ru by200-x64/lib/ruby/gems/2.0.0/gems/calabash-android-0.4.4/lib/calabash-android/lib/manifest_extractor.jar" "C:/Users/Anna/workspace/NetPocoCache/bin/N etPocoCache.apk" (Errno::ENOENT) from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/calabash-android-0.4.4/lib/calabash-android/helpers.rb:29:in manifest' 来自 C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/calabash-android-0.4.4/lib/calabash-android/helpers.rb:12:in package_name' from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/calabash-android-0.4.4/bin/calabash-android-build.rb:21:in C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/calabash-android-0.4.4/bin/calabash-android-build.rb:17:in chdir' from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/calabash-android-0.4.4/bin/calabash-android-build.rb:17:in 块中的 calabash_build 块(2 级)在 c:/Ruby200-x64/lib/ruby/2.0.0/tmpdir.rb:88 中的 calabash_build mktmpdir' from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/calabash-android-0.4.4/bin/calabash-android-build.rb:16:in ' 中:来自 C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/calabash-的 calabash_build' android-0.4.4/lib/calabash-android/helpers.rb:49:in build_test_server_if_needed' from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/calabash-android-0.4.4/bin/calabash-android-run.rb:16:in Calabash_run' 来自 C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/calabash-android-0.4.4/bin/calabash-android:76:in <top (required)>' from C:/Ruby200-x64/bin/calabash-android:23:inload' 来自 C:/Ruby200-x64/bin /calabash-android:23:in `'

4

2 回答 2

1

确保您在以下位置拥有所有必要的可执行文件:C:\Program Files\Java\jdk1.7.0_21 您可以通过java -version从 CMD 执行来测试是否找到了 Java。

您还需要将 JRE 添加到您的路径中,以便找到程序 javaw 等。javaw您可以通过从 CMD执行来测试是否找到了 Javaw 。

我还没有让葫芦在 Ruby 2.0 上工作,但是 1.8.7 对我有用。ruby -version(Ruby 2.0 给了我一个小黄瓜错误)您可以再次测试通过从 CMD执行是否找到了 Ruby 。

除此之外,您的路径似乎正确

于 2013-05-13T13:17:05.193 回答
0

在 mac 机器上,以下步骤应该可以解决它(我遇到了类似的问题):

  1. 检查框架中的密钥库文件是否可用。
  2. 使用ruby​​ -v检查 ruby​​ 版本
  3. 检查所有宝石是否都可用。葫芦-机器人,葫芦-黄瓜
  4. 如果您的默认 ruby​​ 版本发生更改,请在我的情况下使用以下命令,我正在使用rvm --default 使用 2.1.2
于 2018-04-14T15:20:47.073 回答