0

在我的 Xamarin 项目中,我有适用于所有本地设备(也适用于 Android 4.0、5.0 和 6.0)的 UI 测试,但不幸的是,当我在 Xamarin 测试云中运行它们时,它们总是仅适用于 Android 6.0 版本。

这是错误:

1) 安装错误:App.UITests.Droid.Tests.BuildTest(Android).Check_Build
安装:System.Exception:应用安装失败,输出:/Volumes/Data/xamarin/pipeline/versions/7ddfc8e043c82182471a14f3136c778635e1620/base_gems/gems/httpclient- 2.3.4.1/lib/httpclient/session.rb:751:in connect': Object#timeout is deprecated, use Timeout.timeout instead. /Volumes/Data/xamarin/pipeline/versions/7ddfc8e043c82182471a14f3136c778635e1620/base_gems/gems/httpclient-2.3.4.1/lib/httpclient/session.rb:613:in query': Object#timeout 已弃用,请改用 Timeout.timeout。/Volumes/Data/xamarin/pipeline/versions/7ddfc84322c82182471a14f3136c778635e1620/base_gems/gems/httpclient-2.3.4.1/lib/httpclient/session.rb:875:in parse_header': Object#timeout is deprecated, use Timeout.timeout instead. /Volumes/Data/xamarin/pipeline/versions/7ddfc8e0022c82182471a14f3136c778635e1620/base_gems/gems/httpclient-2.3.4.1/lib/httpclient/session.rb:986:in read_body_chunked':Object#timeout 已弃用,请改用 Timeout.timeout。失败。预期的包名称:XXX。Adb Packages Output: /Volumes/Data/xamarin/pipeline/versions/7ddfc8e0342c82182471a14f3136c778635e1620/adt/sdk/platform-tools/adb:402: warning: already initialized constant ARGV /Volumes/Data/xamarin/pipeline/versions/7ddfc343c82182471a14f3136c778635e1620/base_gems/ gems/httpclient-2.3.4.1/lib/httpclient/session.rb:751:in connect': Object#timeout is deprecated, use Timeout.timeout instead. /Volumes/Data/xamarin/pipeline/versions/7ddfc43022c82182471a14f3136c778635e1620/base_gems/gems/httpclient-2.3.4.1/lib/httpclient/session.rb:613:in query': Object#timeout 已弃用,请改用 Timeout.timeout。/Volumes/Data/xamarin/pipeline/versions/7ddfc84322c82182471a14f3136c778635e1620/base_gems/gems/httpclient-2.3.4.1/lib/httpclient/session.rb:875:in parse_header': Object#timeout is deprecated, use Timeout.timeout instead. /Volumes/Data/xamarin/pipeline/versions/7ddfc432c82182471a14f3136c778635e1620/base_gems/gems/httpclient-2.3.4.1/lib/httpclient/session.rb:986:in read_body_chunked':Object#timeout 已弃用,请改用 Timeout.timeout。

4

1 回答 1

1

那是权限的问题。您必须先授予权限。

从 Xamarin 测试页:

当 IDE 首次安装 Android 6.0 应用程序时,它不会授予应用程序所需的所有权限。解决方法是使用 UITest 安装和启动应用程序:

ConfigureApp.Android.Debug().ApkFile(apkpath).StartApp ()

链接到 Xamarin.UITest Cheat Sheet # Android 6.0 页面

于 2017-03-09T11:12:04.437 回答