我正在为TeamCity上的Docker中的一个Android项目运行Jacoco的createDebugCoverageReport
任务,以便进行持续集成。即使在执行createDebugCoverageReport
之前,构建也会在任务connectedDebugAndroidTest
失败,但com.android.ddmlib.ShellCommandUnresponsiveException
日志:
[21:17:31][Step 3/4] :app:validateDebugSigning
[21:17:31][Step 3/4] :app:packageDebugAndroidTest
[21:17:31][Step 3/4] :app:assembleDebugAndroidTest
[21:17:41][Step 3/4] :app:connectedDebugAndroidTest FAILED
[21:17:41][Step 3/4]
[21:17:41][Step 3/4] FAILURE: Build failed with an exception.
[21:17:41][Step 3/4]
[21:17:41][Step 3/4] * What went wrong:
[21:17:41][Step 3/4] Execution failed for task ':app:connectedDebugAndroidTest'.
[21:17:41][Step 3/4] > com.android.builder.testing.api.TestException: com.android.builder.testing.api.DeviceException: com.android.ddmlib.ShellCommandUnresponsiveException
[21:17:41][Step 3/4]
[21:17:41][Step 3/4] * Try:
[21:17:41][Step 3/4] Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
[21:17:41][Step 3/4]
[21:17:41][Step 3/4] BUILD FAILED
[21:17:41][Step 3/4]
[21:17:41][Step 3/4] Total time: 1 mins 7.214 secs
我在Travis上发现workaround on SO类似问题,但解决方案不适用于TeamCity。