1

在设备或模拟器中运行 Xamarin Android UITest 时,我得到了返回码-1073740940ADB.exe

Test Name:  AppLaunches
Test FullName:  UITest1.Tests.AppLaunches
Test Source:    d:\documents\visual studio 2015\Projects\UITest1\UITest1\Tests.cs : line 34
Test Outcome:   Failed
Test Duration:  0:00:18,392

Result StackTrace:  
at Xamarin.UITest.Shared.Processes.ProcessRunner.Run(String path, String arguments)
at Xamarin.UITest.Shared.Android.Commands.CommandAdbInstallPackage.Execute(IProcessRunner processRunner, IAndroidSdkTools androidSdkTools)
at Xamarin.UITest.Shared.Execution.Executor.Execute[TDep1,TDep2](ICommand`2 command)
at Xamarin.UITest.Shared.Android.LocalAndroidAppLifeCycle.InstallApps(ApkFile[] apkFiles)
at Xamarin.UITest.Shared.Android.LocalAndroidAppLifeCycle.EnsureInstalled(ApkFile appApkFile, ApkFile testServerApkFile)
at Xamarin.UITest.Android.AndroidApp..ctor(IAndroidAppConfiguration appConfiguration)
at Xamarin.UITest.Configuration.AndroidAppConfigurator.StartApp(AppDataMode appDataMode)
at UITest1.Tests.BeforeEachTest() in d:\documents\visual studio 2015\Projects\UITest1\UITest1\Tests.cs:line 22
Result Message: 
SetUp : System.Exception : Failed to execute: D:\Program Files (x86)\Android\android-sdk\platform-tools\adb.exe -s 022AQQ7N45014727 install "C:\Users\NB15664\AppData\Local\Temp\uitest\a-2B6E82A0AC77924F988970B83F62C1E372AA00FF\final-02F6B92052E860F661D6071DDD9EC4F95C4ED181.apk" - exit code: -1073740940
    pkg: /data/local/tmp/final-02F6B92052E860F661D6071DDD9EC4F95C4ED181.apk

Success

输出窗口给了我这个:

Test Name:  AppLaunches
Test Outcome:   Failed
Result Message: 
SetUp : System.Exception : Failed to execute: D:\Program Files (x86)\Android\android-sdk\platform-tools\adb.exe -s 022AQQ7N45014727 install "C:\Users\NB15664\AppData\Local\Temp\uitest\a-2B6E82A0AC77924F988970B83F62C1E372AA00FF\final-02F6B92052E860F661D6071DDD9EC4F95C4ED181.apk" - exit code: -1073740940
    pkg: /data/local/tmp/final-02F6B92052E860F661D6071DDD9EC4F95C4ED181.apk

Success
Result StandardOutput:  Full log file: C:\Users\AppData\Local\Temp\uitest\log-2016-04-20_16-43-10-687.txt
Skipping IDE integration as important properties are configured. To force IDE integration, add .PreferIdeSettings() to ConfigureApp.
Android test running Xamarin.UITest version: 1.0.0
Running in unactivated mode. Test run will be restricted to simulators for a maximum duration of 15 minutes. The full version is available for Xamarin Test Cloud customers, for more information contact sales@xamarin.com.
Initializing Android app on device 022AQQ7N45014727 with apk: d:\documents\visual studio 2015\Projects\UITest1\app-debug.apk
Signing apk with Xamarin keystore.

如果我发送 APK 进行远程测试执行,它可以工作并通过。

可能是什么问题?

4

1 回答 1

0

将我的 adb.exe 从 20/04/2016 17:13 替换为一个从 20/08/2015 13:21 解决了这个问题。

谢谢。

于 2016-04-22T08:18:32.117 回答