我在Ubuntu设备上运行Spoon测试没有任何问题,但是当我在OSX上启动时,我每次都会收到以下异常:
02:47:58 E/Device: Error during Sync: timeout.
2015-10-21 14:47:58 [SDR.run] InstallException on device [006f0ef0525312ff]
com.android.ddmlib.InstallException
at com.android.ddmlib.Device.installPackage(Device.java:850)
at com.squareup.spoon.SpoonDeviceRunner.run(SpoonDeviceRunner.java:181)
at com.squareup.spoon.SpoonRunner.runTests(SpoonRunner.java:153)
at com.squareup.spoon.SpoonRunner.run(SpoonRunner.java:113)
at com.squareup.spoon.SpoonRunner.main(SpoonRunner.java:530)
Caused by: com.android.ddmlib.TimeoutException
at com.android.ddmlib.AdbHelper.read(AdbHelper.java:769)
at com.android.ddmlib.AdbHelper.read(AdbHelper.java:737)
at com.android.ddmlib.AdbHelper.readAdbResponse(AdbHelper.java:226)
at com.android.ddmlib.AdbHelper.setDevice(AdbHelper.java:855)
at com.android.ddmlib.SyncService.openSync(SyncService.java:168)
at com.android.ddmlib.Device.getSyncService(Device.java:481)
at com.android.ddmlib.Device.syncPackageToDevice(Device.java:1051)
at com.android.ddmlib.Device.installPackage(Device.java:841)
... 4 more
java.lang.NullPointerException
at com.google.common.base.Preconditions.checkNotNull(Preconditions.java:210)
at com.squareup.spoon.DeviceResult$Builder.markInstallAsFailed(DeviceResult.java:113)
at com.squareup.spoon.SpoonDeviceRunner.run(SpoonDeviceRunner.java:194)
at com.squareup.spoon.SpoonRunner.runTests(SpoonRunner.java:153)
at com.squareup.spoon.SpoonRunner.run(SpoonRunner.java:113)
at com.squareup.spoon.SpoonRunner.main(SpoonRunner.java:530)
我正在使用Spoon runner v 1.2.0。我在env路径中有adb,我可以使用adb install
命令安装相同的apk。此外,我试图更改Android监视器中的ADB_INSTALL_TIMEOUT
并将env变量设置为15秒,但它没有帮助。
答案 0 :(得分:0)
我在旧版ADB上运行Spoon时遇到了类似的问题。
检查您的ADB版本至少1.0.31或更高版本。