在Windows中的Calabash-Android中运行apk时出错

时间:2022-06-16 22:32:03

I have setup calabash-android successfully. also resign the apk was successful. Now during run the apk i am getting below error. can anyone please help me to solve this.

我已经成功设置了calabash-android。也辞职了apk成功了。现在在运行期间apk我得到以下错误。任何人都可以帮我解决这个问题。

C:\Users\test\Automation>bundle exec calabash-android run test_9.apk
undefined method `dir' for nil:NilClass (NoMethodError)
C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/run_loop-
2.5.2/lib/run_loop/environment.r
b:12:in `user_home_directory'
C:/Ruby23x64/lib/ruby/gems/2.3.0/gems/run_loop2.5.2/
lib/run_loop/device.rb:564
:in `<class:Device>'
C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/run_loop-
2.5.2/lib/run_loop/device.rb:2:i
n `<module:RunLoop>'
C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/run_loop-
2.5.2/lib/run_loop/device.rb:1:i
n `<top (required)>'

1 个解决方案

#1


0  

I haven't used Windows for years, I use Calabash on MacOS. Maybe the %USERPROFILE% environment variable isn't set or points to valid directory. Open the Command Prompt and check it:

我多年没有使用过Windows,我在MacOS上使用了Calabash。可能未设置%USERPROFILE%环境变量或指向有效目录。打开命令提示符并检查它:

echo %USERPROFILE%

In your case, it should return this

在你的情况下,它应该返回此

C:\Users\test

If it's not, you should set it

如果不是,你应该设置它

set USERPROFILE=C:\Users\test

Although you can list all environment variables with this single command

虽然您可以使用此单个命令列出所有环境变量

set

Look for some suspicious or undefinied thing. E.g. the value of %USERNAME% variable should equal to test.

寻找一些可疑或未完成的事情。例如。 %USERNAME%变量的值应等于test。

#1


0  

I haven't used Windows for years, I use Calabash on MacOS. Maybe the %USERPROFILE% environment variable isn't set or points to valid directory. Open the Command Prompt and check it:

我多年没有使用过Windows,我在MacOS上使用了Calabash。可能未设置%USERPROFILE%环境变量或指向有效目录。打开命令提示符并检查它:

echo %USERPROFILE%

In your case, it should return this

在你的情况下,它应该返回此

C:\Users\test

If it's not, you should set it

如果不是,你应该设置它

set USERPROFILE=C:\Users\test

Although you can list all environment variables with this single command

虽然您可以使用此单个命令列出所有环境变量

set

Look for some suspicious or undefinied thing. E.g. the value of %USERNAME% variable should equal to test.

寻找一些可疑或未完成的事情。例如。 %USERNAME%变量的值应等于test。