我的执行环境:
我使用的命令:
calabash-android run xxx.apk
我得到的错误消息:
No test server found for this combination of app and calabash version. Recreating test server.
C:/Ruby193/lib/ruby/gems/1.9.1/gems/calabash-android-0.5.2/lib/calabash-android/helpers.rb:159:in `scan': invalid byte sequence in CP950 (ArgumentError)
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/calabash-android-0.5.2/lib/calabash-android/helpers.rb:159:in `extract_md5_fingerprint'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/calabash-android-0.5.2/lib/calabash-android/helpers.rb:151:in `block (2 levels) in fingerprint_from_apk'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/calabash-android-0.5.2/lib/calabash-android/helpers.rb:137:in `chdir'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/calabash-android-0.5.2/lib/calabash-android/helpers.rb:137:in `block in fingerprint_from_apk'
from C:/Ruby193/lib/ruby/1.9.1/tmpdir.rb:83:in `mktmpdir'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/calabash-android-0.5.2/lib/calabash-android/helpers.rb:136:in `fingerprint_from_apk'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/calabash-android-0.5.2/bin/calabash-android-build.rb:2:in `calabash_build'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/calabash-android-0.5.2/lib/calabash-android/helpers.rb:92:in `build_test_server_if_needed'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/calabash-android-0.5.2/bin/calabash-android-run.rb:16:in `calabash_run'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/calabash-android-0.5.2/bin/calabash-android:85:in `<top (required)>'
from C:/Ruby193/bin/calabash-android:24:in `load'
from C:/Ruby193/bin/calabash-android:24:in `<main>'
答案 0 :(得分:0)
这是因为在Windows中文版上运行Ruby时,默认编码是UTF-8。 我们必须强制Ruby使用UTF-8编码来运行它。所以我修改命令如下:
[Ruby installed path] -EUTF-8 [calabash-andorid installed path] run [apk path]
P.S。我的calabash-android安装路径:
C:\Ruby193\lib\ruby\gems\1.9.1\gems\calabash-android-0.5.2\bin\calabash-android