我在 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。此外,我试图更改ADB_INSTALL_TIMEOUT
Android Monitor 并将 env 变量设置为 15 秒,但没有帮助。