travis-ci build continua a mancare con ShellCommandUnresponsiveException

Sto cercando di get travis-ci per lavorare con la mia applicazione android. Se eseguo solo assembembleDebug funziona bene. Ma voglio eseguire test e generare copertura di codice. Questa è la configuration che ho adesso:

language: android android: components: # Uncomment the lines below if you want to # use the latest revision of Android SDK Tools - platform-tools - tools # The BuildTools version used by your project - build-tools-23.0.1 # The SDK version used to compile your project - android-23 # Additional components # - extra-google-google_play_services # - extra-google-m2repository - extra-android-m2repository # - addon-google_apis-google-19 # Specify at least one system image, # if you need to run emulator(s) during your tests - sys-img-armeabi-v7a-android-23 env: global: # install timeout in minutes (2 minutes by default) - ADB_INSTALL_TIMEOUT=8 before_install: - chmod +x gradlew - pip install --user codecov # Emulator Management: Create, Start and Wait before_script: - echo no | android create avd --force --name test --target android-23 --abi armeabi-v7a - emulator -avd test -no-skin -no-audio -no-window -no-boot-anim & - android-wait-for-emulator - adb shell input keyevent 82 & script: - ./gradlew build connectedCheck --stacktrace # - ./gradlew assembleDebug after_success: - codecov 

La struttura continua a mancare con ShellCommandUnresponsiveException , anche se ho impostato la variabile globale ADB_INSTALL_TIMEOUT su 8 ( origine ). La costruzione in sé non corre nemless per 8 minuti, quindi è strano perché non riesce.

  • Differenza tra system.gc () e runtime.gc ()
  • Layout di Smudged Android
  • Problemi di comprensione del layout_weight di Android
  • Leggere un Array Json in android
  • Recuperare il numero e l'IMEI del telefono cellulare
  • Android: Aiuta ad adattare la scheda ListView con una class ImageLoader (LazyList)
  • Ho provato a eliminare tutti i file di asset per rendere l'applicazione il più piccolo ansible. Ma questo non ci ha aiutato.

    Le costruzioni fallite possono essere trovate qui: https://travis-ci.org/Longi94/bptf/branches sotto il branch travis where stavo cercando di farlo funzionare. C'era una costruzione di successo. Non ho idea di come è passata.

    Ecco una parte di un registro di creazione non riuscito:

     [0K$ echo no | android create avd --force --name test --target android-23 --abi armeabi-v7a Android 6.0 is a basic Android platform. Do you wish to create a custom hardware profile [no]Created AVD 'test' based on Android 6.0, ARM (armeabi-v7a) processr, with the following hardware config: hw.cpu.model=cortex-a8 hw.lcd.density=240 hw.ramSize=512 vm.heapSize=48 travis_time:end:1030008c:start=1446127538783461373,finish=1446127542625988764,duration=3842527391 [0Ktravis_fold:end:before_script.1 [0Ktravis_fold:start:before_script.2 [0Ktravis_time:start:16b2cef4 [0K$ emulator -avd test -no-skin -no-audio -no-window -no-boot-anim & travis_time:end:16b2cef4:start=1446127542630405331,finish=1446127542635242867,duration=4837536 [0Ktravis_fold:end:before_script.2 [0Ktravis_fold:start:before_script.3 [0Ktravis_time:start:00e87790 [0K$ android-wait-for-emulator emulator: WARNING: Increasing RAM size to 1GB Waiting for emulator to start Creating filesystem with parameters: Size: 576716800 Block size: 4096 Blocks per group: 32768 Inodes per group: 7040 Inode size: 256 Journal blocks: 2200 Label: Blocks: 140800 Block groups: 5 Reserved block group size: 39 Created filesystem with 11/35200 inodes and 4536/140800 blocks resize2fs 1.42.13 (17-May-2015) The filesystem is already 140800 (4k) blocks long. Nothing to do! Creating filesystem with parameters: Size: 69206016 Block size: 4096 Blocks per group: 32768 Inodes per group: 4224 Inode size: 256 Journal blocks: 1024 Label: Blocks: 16896 Block groups: 1 Reserved block group size: 7 Created filesystem with 11/4224 inodes and 1302/16896 blocks emulator: UpdateCheck: current version '24.4.1', last version '24.4.1' Waiting for emulator to start ... (pruned due to character limit) Waiting for emulator to start Emulator is ready travis_time:end:00e87790:start=1446127542639319959,finish=1446127617455640922,duration=74816320963 [0Ktravis_fold:end:before_script.3 [0Ktravis_fold:start:before_script.4 [0Ktravis_time:start:0b2fd946 [0K$ adb shell input keyevent 82 & travis_time:end:0b2fd946:start=1446127617473299362,finish=1446127617478276750,duration=4977388 [0Ktravis_fold:end:before_script.4 [0Ktravis_time:start:248749b0 [0K$ ./gradlew build connectedCheck --stacktrace Downloading https://services.gradle.org/distributions/gradle-2.2.1-all.zip ................................................................................ Unzipping /home/travis/.gradle/wrapper/dists/gradle-2.2.1-all/6dibv5rcnnqlfbq9klf8imrndn/gradle-2.2.1-all.zip to /home/travis/.gradle/wrapper/dists/gradle-2.2.1-all/6dibv5rcnnqlfbq9klf8imrndn Set executable permissions for: /home/travis/.gradle/wrapper/dists/gradle-2.2.1-all/6dibv5rcnnqlfbq9klf8imrndn/gradle-2.2.1/bin/gradle Download https://jcenter.bintray.com/com/android/tools/build/gradle/1.3.0/gradle-1.3.0.pom Download https://jcenter.bintray.com/com/android/tools/build/gradle-core/1.3.0/gradle-core-1.3.0.pom Download https://jcenter.bintray.com/com/android/tools/build/builder/1.3.0/builder-1.3.0.pom Download https://jcenter.bintray.com/com/android/tools/lint/lint/24.3.0/lint-24.3.0.pom Download https://jcenter.bintray.com/net/sf/proguard/proguard-gradle/5.2.1/proguard-gradle-5.2.1.pom Download https://jcenter.bintray.com/net/sf/proguard/proguard-parent/5.2.1/proguard-parent-5.2.1.pom Download https://jcenter.bintray.com/com/android/tools/build/builder-model/1.3.0/builder-model-1.3.0.pom Download https://jcenter.bintray.com/com/android/tools/build/builder-test-api/1.3.0/builder-test-api-1.3.0.pom Download https://jcenter.bintray.com/com/android/tools/sdklib/24.3.0/sdklib-24.3.0.pom Download https://jcenter.bintray.com/com/android/tools/sdk-common/24.3.0/sdk-common-24.3.0.pom Download https://jcenter.bintray.com/com/android/tools/common/24.3.0/common-24.3.0.pom Download https://jcenter.bintray.com/com/android/tools/build/manifest-merger/24.3.0/manifest-merger-24.3.0.pom Download https://jcenter.bintray.com/com/android/tools/ddms/ddmlib/24.3.0/ddmlib-24.3.0.pom Download https://jcenter.bintray.com/com/squareup/javawriter/2.5.0/javawriter-2.5.0.pom Download https://jcenter.bintray.com/org/sonatype/oss/oss-parent/7/oss-parent-7.pom Download https://jcenter.bintray.com/org/bouncycastle/bcpkix-jdk15on/1.48/bcpkix-jdk15on-1.48.pom Download https://jcenter.bintray.com/org/bouncycastle/bcprov-jdk15on/1.48/bcprov-jdk15on-1.48.pom Download https://jcenter.bintray.com/org/ow2/asm/asm/5.0.3/asm-5.0.3.pom Download https://jcenter.bintray.com/org/ow2/asm/asm-parent/5.0.3/asm-parent-5.0.3.pom Download https://jcenter.bintray.com/org/ow2/ow2/1.3/ow2-1.3.pom Download https://jcenter.bintray.com/org/ow2/asm/asm-tree/5.0.3/asm-tree-5.0.3.pom Download https://jcenter.bintray.com/com/android/tools/jack/jack-api/0.9.0/jack-api-0.9.0.pom Download https://jcenter.bintray.com/com/android/tools/jill/jill-api/0.9.0/jill-api-0.9.0.pom Download https://jcenter.bintray.com/com/android/tools/lint/lint-checks/24.3.0/lint-checks-24.3.0.pom Download https://jcenter.bintray.com/org/eclipse/jdt/core/compiler/ecj/4.4.2/ecj-4.4.2.pom Download https://jcenter.bintray.com/net/sf/proguard/proguard-base/5.2.1/proguard-base-5.2.1.pom Download https://jcenter.bintray.com/com/android/tools/annotations/24.3.0/annotations-24.3.0.pom Download https://jcenter.bintray.com/com/android/tools/layoutlib/layoutlib-api/24.3.0/layoutlib-api-24.3.0.pom Download https://jcenter.bintray.com/com/android/tools/dvlib/24.3.0/dvlib-24.3.0.pom Download https://jcenter.bintray.com/com/google/code/gson/gson/2.2.4/gson-2.2.4.pom Download https://jcenter.bintray.com/org/apache/commons/commons-compress/1.8.1/commons-compress-1.8.1.pom Download https://jcenter.bintray.com/org/apache/commons/commons-parent/33/commons-parent-33.pom Download https://jcenter.bintray.com/org/apache/apache/13/apache-13.pom Download https://jcenter.bintray.com/org/apache/httpcomponents/httpclient/4.1.1/httpclient-4.1.1.pom Download https://jcenter.bintray.com/org/apache/httpcomponents/httpcomponents-client/4.1.1/httpcomponents-client-4.1.1.pom Download https://jcenter.bintray.com/org/apache/httpcomponents/project/4.1.1/project-4.1.1.pom Download https://jcenter.bintray.com/org/apache/httpcomponents/httpmime/4.1/httpmime-4.1.pom Download https://jcenter.bintray.com/org/apache/httpcomponents/httpcomponents-client/4.1/httpcomponents-client-4.1.pom Download https://jcenter.bintray.com/com/google/guava/guava/17.0/guava-17.0.pom Download https://jcenter.bintray.com/com/google/guava/guava-parent/17.0/guava-parent-17.0.pom Download https://jcenter.bintray.com/net/sf/kxml/kxml2/2.3.0/kxml2-2.3.0.pom Download https://jcenter.bintray.com/com/android/tools/lint/lint-api/24.3.0/lint-api-24.3.0.pom Download https://jcenter.bintray.com/org/ow2/asm/asm-analysis/5.0.3/asm-analysis-5.0.3.pom Download https://jcenter.bintray.com/com/intellij/annotations/12.0/annotations-12.0.pom Download https://jcenter.bintray.com/org/apache/httpcomponents/httpcore/4.1/httpcore-4.1.pom Download https://jcenter.bintray.com/org/apache/httpcomponents/httpcomponents-core/4.1/httpcomponents-core-4.1.pom Download https://jcenter.bintray.com/commons-logging/commons-logging/1.1.1/commons-logging-1.1.1.pom Download https://jcenter.bintray.com/org/apache/commons/commons-parent/5/commons-parent-5.pom Download https://jcenter.bintray.com/org/apache/apache/4/apache-4.pom Download https://jcenter.bintray.com/commons-codec/commons-codec/1.4/commons-codec-1.4.pom Download https://jcenter.bintray.com/org/apache/commons/commons-parent/11/commons-parent-11.pom Download https://jcenter.bintray.com/com/android/tools/external/lombok/lombok-ast/0.2.3/lombok-ast-0.2.3.pom Download https://jcenter.bintray.com/com/android/tools/build/gradle/1.3.0/gradle-1.3.0.jar Download https://jcenter.bintray.com/com/android/tools/build/gradle-core/1.3.0/gradle-core-1.3.0.jar Download https://jcenter.bintray.com/com/android/tools/build/builder/1.3.0/builder-1.3.0.jar Download https://jcenter.bintray.com/com/android/tools/lint/lint/24.3.0/lint-24.3.0.jar Download https://jcenter.bintray.com/net/sf/proguard/proguard-gradle/5.2.1/proguard-gradle-5.2.1.jar Download https://jcenter.bintray.com/com/android/tools/build/builder-model/1.3.0/builder-model-1.3.0.jar Download https://jcenter.bintray.com/com/android/tools/build/builder-test-api/1.3.0/builder-test-api-1.3.0.jar Download https://jcenter.bintray.com/com/android/tools/sdklib/24.3.0/sdklib-24.3.0.jar Download https://jcenter.bintray.com/com/android/tools/sdk-common/24.3.0/sdk-common-24.3.0.jar Download https://jcenter.bintray.com/com/android/tools/common/24.3.0/common-24.3.0.jar Download https://jcenter.bintray.com/com/android/tools/build/manifest-merger/24.3.0/manifest-merger-24.3.0.jar Download https://jcenter.bintray.com/com/android/tools/ddms/ddmlib/24.3.0/ddmlib-24.3.0.jar Download https://jcenter.bintray.com/com/squareup/javawriter/2.5.0/javawriter-2.5.0.jar Download https://jcenter.bintray.com/org/bouncycastle/bcpkix-jdk15on/1.48/bcpkix-jdk15on-1.48.jar Download https://jcenter.bintray.com/org/bouncycastle/bcprov-jdk15on/1.48/bcprov-jdk15on-1.48.jar Download https://jcenter.bintray.com/org/ow2/asm/asm/5.0.3/asm-5.0.3.jar Download https://jcenter.bintray.com/org/ow2/asm/asm-tree/5.0.3/asm-tree-5.0.3.jar Download https://jcenter.bintray.com/com/android/tools/jack/jack-api/0.9.0/jack-api-0.9.0.jar Download https://jcenter.bintray.com/com/android/tools/jill/jill-api/0.9.0/jill-api-0.9.0.jar Download https://jcenter.bintray.com/com/android/tools/lint/lint-checks/24.3.0/lint-checks-24.3.0.jar Download https://jcenter.bintray.com/org/eclipse/jdt/core/compiler/ecj/4.4.2/ecj-4.4.2.jar Download https://jcenter.bintray.com/net/sf/proguard/proguard-base/5.2.1/proguard-base-5.2.1.jar Download https://jcenter.bintray.com/com/android/tools/annotations/24.3.0/annotations-24.3.0.jar Download https://jcenter.bintray.com/com/android/tools/layoutlib/layoutlib-api/24.3.0/layoutlib-api-24.3.0.jar Download https://jcenter.bintray.com/com/android/tools/dvlib/24.3.0/dvlib-24.3.0.jar Download https://jcenter.bintray.com/com/google/code/gson/gson/2.2.4/gson-2.2.4.jar Download https://jcenter.bintray.com/org/apache/commons/commons-compress/1.8.1/commons-compress-1.8.1.jar Download https://jcenter.bintray.com/org/apache/httpcomponents/httpclient/4.1.1/httpclient-4.1.1.jar Download https://jcenter.bintray.com/org/apache/httpcomponents/httpmime/4.1/httpmime-4.1.jar Download https://jcenter.bintray.com/com/google/guava/guava/17.0/guava-17.0.jar Download https://jcenter.bintray.com/net/sf/kxml/kxml2/2.3.0/kxml2-2.3.0.jar Download https://jcenter.bintray.com/com/android/tools/lint/lint-api/24.3.0/lint-api-24.3.0.jar Download https://jcenter.bintray.com/org/ow2/asm/asm-analysis/5.0.3/asm-analysis-5.0.3.jar Download https://jcenter.bintray.com/com/intellij/annotations/12.0/annotations-12.0.jar Download https://jcenter.bintray.com/org/apache/httpcomponents/httpcore/4.1/httpcore-4.1.jar Download https://jcenter.bintray.com/commons-logging/commons-logging/1.1.1/commons-logging-1.1.1.jar Download https://jcenter.bintray.com/commons-codec/commons-codec/1.4/commons-codec-1.4.jar Download https://jcenter.bintray.com/com/android/tools/external/lombok/lombok-ast/0.2.3/lombok-ast-0.2.3.jar Download https://jcenter.bintray.com/org/jacoco/org.jacoco.agent/0.7.4.201502262128/org.jacoco.agent-0.7.4.201502262128.pom Download https://jcenter.bintray.com/org/jacoco/org.jacoco.build/0.7.4.201502262128/org.jacoco.build-0.7.4.201502262128.pom Download https://jcenter.bintray.com/org/jacoco/org.jacoco.agent/0.7.4.201502262128/org.jacoco.agent-0.7.4.201502262128.jar :app:preBuild UP-TO-DATE :app:preDebugBuild UP-TO-DATE :app:checkDebugManifest :app:preReleaseBuild UP-TO-DATE :app:prepareComAndroidSupportAppcompatV72310Library :app:prepareComAndroidSupportCardviewV72310Library :app:prepareComAndroidSupportDesign2310Library :app:prepareComAndroidSupportRecyclerviewV72310Library :app:prepareComAndroidSupportSupportV42310Library :app:prepareDebugDependencies :app:compileDebugAidl :app:compileDebugRenderscript :app:generateDebugBuildConfig :app:generateDebugAssets UP-TO-DATE :app:mergeDebugAssets :app:generateDebugResValues :app:generateDebugResources :app:mergeDebugResources :app:processDebugManifest :app:processDebugResources :app:generateDebugSources :app:processDebugJavaRes UP-TO-DATE :app:compileDebugJavaWithJavacNote: Some input files use or override a deprecated API. Note: Recompile with -Xlint:deprecation for details. :app:compileDebugNdk UP-TO-DATE :app:compileDebugSources :app:unzipJacocoAgent :app:instrumentDebug Download https://jcenter.bintray.com/org/jacoco/org.jacoco.ant/0.7.4.201502262128/org.jacoco.ant-0.7.4.201502262128.pom Download https://jcenter.bintray.com/org/jacoco/org.jacoco.core/0.7.4.201502262128/org.jacoco.core-0.7.4.201502262128.pom Download https://jcenter.bintray.com/org/jacoco/org.jacoco.report/0.7.4.201502262128/org.jacoco.report-0.7.4.201502262128.pom Download https://jcenter.bintray.com/org/ow2/asm/asm-debug-all/5.0.1/asm-debug-all-5.0.1.pom Download https://jcenter.bintray.com/org/ow2/asm/asm-parent/5.0.1/asm-parent-5.0.1.pom Download https://jcenter.bintray.com/org/jacoco/org.jacoco.ant/0.7.4.201502262128/org.jacoco.ant-0.7.4.201502262128.jar Download https://jcenter.bintray.com/org/jacoco/org.jacoco.core/0.7.4.201502262128/org.jacoco.core-0.7.4.201502262128.jar Download https://jcenter.bintray.com/org/jacoco/org.jacoco.report/0.7.4.201502262128/org.jacoco.report-0.7.4.201502262128.jar Download https://jcenter.bintray.com/org/ow2/asm/asm-debug-all/5.0.1/asm-debug-all-5.0.1.jar :app:preDexDebug :app:dexDebug :app:validateDebugSigning :app:packageDebug :app:zipalignDebug :app:assembleDebug :app:checkReleaseManifest :app:prepareReleaseDependencies :app:compileReleaseAidl :app:compileReleaseRenderscript :app:generateReleaseBuildConfig :app:generateReleaseAssets UP-TO-DATE :app:mergeReleaseAssets :app:generateReleaseResValues :app:generateReleaseResources :app:mergeReleaseResources :app:processReleaseManifest :app:processReleaseResources :app:generateReleaseSources :app:processReleaseJavaRes UP-TO-DATE :app:compileReleaseJavaWithJavacNote: Some input files use or override a deprecated API. Note: Recompile with -Xlint:deprecation for details. :app:compileReleaseNdk UP-TO-DATE :app:compileReleaseSources :app:preDexRelease :app:dexRelease :app:packageRelease :app:assembleRelease :app:assemble :app:compileLint :app:lint Ran lint on variant release: 102 issues found Ran lint on variant debug: 102 issues found Wrote HTML report to file:/home/travis/build/Longi94/bptf/app/build/outputs/lint-results.html Wrote XML report to /home/travis/build/Longi94/bptf/app/build/outputs/lint-results.xml :app:preDebugUnitTestBuild UP-TO-DATE :app:prepareDebugUnitTestDependencies :app:processDebugUnitTestJavaRes UP-TO-DATE :app:compileDebugUnitTestJavaWithJavac UP-TO-DATE :app:compileDebugUnitTestSources UP-TO-DATE :app:mockableAndroidJar :app:assembleDebugUnitTest :app:testDebugUnitTest :app:preReleaseUnitTestBuild UP-TO-DATE :app:prepareReleaseUnitTestDependencies :app:processReleaseUnitTestJavaRes UP-TO-DATE :app:compileReleaseUnitTestJavaWithJavac UP-TO-DATE :app:compileReleaseUnitTestSources UP-TO-DATE :app:assembleReleaseUnitTest :app:testReleaseUnitTest :app:test :app:check :app:build :app:preDebugAndroidTestBuild UP-TO-DATE :app:prepareDebugAndroidTestDependencies :app:compileDebugAndroidTestAidl :app:processDebugAndroidTestManifest :app:compileDebugAndroidTestRenderscript :app:generateDebugAndroidTestBuildConfig :app:generateDebugAndroidTestAssets UP-TO-DATE :app:mergeDebugAndroidTestAssets :app:generateDebugAndroidTestResValues :app:generateDebugAndroidTestResources :app:mergeDebugAndroidTestResources :app:processDebugAndroidTestResources :app:generateDebugAndroidTestSources :app:processDebugAndroidTestJavaRes UP-TO-DATE :app:compileDebugAndroidTestJavaWithJavac :app:compileDebugAndroidTestNdk UP-TO-DATE :app:compileDebugAndroidTestSources :app:preDexDebugAndroidTest :app:dexDebugAndroidTest :app:packageDebugAndroidTest :app:assembleDebugAndroidTest :app:connectedDebugAndroidTest FAILED FAILURE: Build failed with an exception. * What went wrong: Execution failed for task ':app:connectedDebugAndroidTest'. > com.android.builder.testing.api.TestException: com.android.builder.testing.api.DeviceException: com.android.ddmlib.ShellCommandUnresponsiveException * Try: Run with --info or --debug option to get more log output. * Exception is: org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':app:connectedDebugAndroidTest'. at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:69) at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:46) at org.gradle.api.internal.tasks.execution.PostExecutionAnalysisTaskExecuter.execute(PostExecutionAnalysisTaskExecuter.java:35) at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:64) at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:58) at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:42) at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:52) at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:53) at org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter.execute(ExecuteAtMostOnceTaskExecuter.java:43) at org.gradle.api.internal.AbstractTask.executeWithoutThrowingTaskFailure(AbstractTask.java:305) at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.executeTask(AbstractTaskPlanExecutor.java:79) at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.processTask(AbstractTaskPlanExecutor.java:63) at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.run(AbstractTaskPlanExecutor.java:51) at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor.process(DefaultTaskPlanExecutor.java:23) at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter.execute(DefaultTaskGraphExecuter.java:88) at org.gradle.execution.SelectedTaskExecutionAction.execute(SelectedTaskExecutionAction.java:29) at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:62) at org.gradle.execution.DefaultBuildExecuter.access$200(DefaultBuildExecuter.java:23) at org.gradle.execution.DefaultBuildExecuter$2.proceed(DefaultBuildExecuter.java:68) at org.gradle.execution.DryRunBuildExecutionAction.execute(DryRunBuildExecutionAction.java:32) at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:62) at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:55) at org.gradle.initialization.DefaultGradleLauncher.doBuildStages(DefaultGradleLauncher.java:149) at org.gradle.initialization.DefaultGradleLauncher.doBuild(DefaultGradleLauncher.java:106) at org.gradle.initialization.DefaultGradleLauncher.run(DefaultGradleLauncher.java:86) at org.gradle.launcher.exec.InProcessBuildActionExecuter$DefaultBuildController.run(InProcessBuildActionExecuter.java:80) at org.gradle.launcher.cli.ExecuteBuildAction.run(ExecuteBuildAction.java:33) at org.gradle.launcher.cli.ExecuteBuildAction.run(ExecuteBuildAction.java:24) at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:36) at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:26) at org.gradle.launcher.cli.RunBuildAction.run(RunBuildAction.java:51) at org.gradle.internal.Actions$RunnableActionAdapter.execute(Actions.java:171) at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:237) at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:210) at org.gradle.launcher.cli.JavaRuntimeValidationAction.execute(JavaRuntimeValidationAction.java:35) at org.gradle.launcher.cli.JavaRuntimeValidationAction.execute(JavaRuntimeValidationAction.java:24) at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:206) at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:169) at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:33) at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:22) at org.gradle.launcher.Main.doAction(Main.java:33) at org.gradle.launcher.bootstrap.EntryPoint.run(EntryPoint.java:45) at org.gradle.launcher.bootstrap.ProcessBootstrap.runNoExit(ProcessBootstrap.java:54) at org.gradle.launcher.bootstrap.ProcessBootstrap.run(ProcessBootstrap.java:35) at org.gradle.launcher.GradleMain.main(GradleMain.java:23) at org.gradle.wrapper.BootstrapMainStarter.start(BootstrapMainStarter.java:33) at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:130) at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:48) Caused by: org.gradle.internal.UncheckedException: com.android.builder.testing.api.TestException: com.android.builder.testing.api.DeviceException: com.android.ddmlib.ShellCommandUnresponsiveException at org.gradle.internal.UncheckedException.throwAsUncheckedException(UncheckedException.java:39) at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:66) at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.doExecute(AnnotationProcessingTaskFactory.java:218) at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.execute(AnnotationProcessingTaskFactory.java:211) at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.execute(AnnotationProcessingTaskFactory.java:200) at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:579) at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:562) at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:80) at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:61) ... 47 more Caused by: com.android.builder.testing.api.TestException: com.android.builder.testing.api.DeviceException: com.android.ddmlib.ShellCommandUnresponsiveException at com.android.builder.testing.SimpleTestRunner.runTests(SimpleTestRunner.java:93) at com.android.build.gradle.internal.tasks.DeviceProviderInstrumentTestTask.runTests(DeviceProviderInstrumentTestTask.java:112) at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:63) ... 54 more Caused by: com.android.builder.testing.api.DeviceException: com.android.ddmlib.ShellCommandUnresponsiveException at com.android.builder.testing.ConnectedDevice.getDeviceConfig(ConnectedDevice.java:259) at com.android.builder.testing.api.DeviceConfigProviderImpl.<init>(DeviceConfigProviderImpl.java:36) at com.android.builder.testing.SimpleTestRunner.runTests(SimpleTestRunner.java:91) ... 56 more Caused by: com.android.ddmlib.ShellCommandUnresponsiveException at com.android.ddmlib.AdbHelper.executeRemoteCommand(AdbHelper.java:511) at com.android.ddmlib.AdbHelper.executeRemoteCommand(AdbHelper.java:388) at com.android.ddmlib.Device.executeShellCommand(Device.java:577) at com.android.builder.testing.ConnectedDevice.executeShellCommand(ConnectedDevice.java:136) at com.android.builder.testing.ConnectedDevice.getDeviceConfig(ConnectedDevice.java:256) ... 58 more BUILD FAILED Total time: 3 mins 27.125 secs travis_time:end:248749b0:start=1446127617481908384,finish=1446127825369726746,duration=207887818362 [0K [31;1mThe command "./gradlew build connectedCheck --stacktrace" exited with 1.[0m Done. Your build exited with 1. 

    Qualsiasi aiuto sarebbe apprezzato!

    EDIT dopo il suggerimento di ProbleSlover:

    Dopo aver rimosso le linee di platform-tools e tools platform-tools . Sembrava che la costruzione non abbia aspettato abbastanza a lungo per far partire l'emulatore in precedenza. Ora ci sono molte aspettative e i timeout di build con il seguente errore:

     Waiting for emulator to start Timeout (360 seconds) reached; failed to start emulator The command "android-wait-for-emulator" failed and exited with 1 during . Your build has been stopped. 

  • Come posso caricare una pagina web all'interno del webview di phonegap?
  • Come get le size in memory di un object in Android o benchmark di performance?
  • Come gestire il button "Su"?
  • Magick dell'image di Android
  • cosa significa il su: process = Runtime.getRuntime (). exec ("su");
  • Come installare APK da PC?
  • One Solution collect form web for “travis-ci build continua a mancare con ShellCommandUnresponsiveException”

    Risposta breve

    Android Gradle Plugin aveva un valore di timeout rigido che era troppo basso.

    Google ha risolto la versione 2.0.0-beta3 :

    Sarà in 2.0.0-beta3.

    Quindi cosa mettiamo in build.gradle per impostare questo valore di timeout?

    Attualmente è tutto collegato a android.adbOptions.timeOutInMs.

    Esempio: progetto Google Aumentare il timeout ADB e aggiungere il supporto Travis-ci . Funziona !


    Risposta precedente

    Stai distriggersndo l'animatore di avvio e lo script script android-wait-for-emulator dipende da esso, quindi lo script predefinito esce dal loop prima che l'emulatore sia pronto. Leggi questa grande spiegazione .

    Ho scritto su di esso quando lo script è stato bloccato qui

    Ora lo script funziona e devi solo eliminare -no-boot-anim qui:

      - emulator -avd test -no-skin -no-audio -no-window & 

    In alternativa, puoi distriggersre l'animation di avvio che lo velocizza, ma devi modificare lo script aggiungendo il tempo che sai è sufficiente per essere pronto per l'emulatore.

    A volte lo faccio, come qui

     # Wait for device ready function wait-for-device-ready { local bootanim="" local failcounter=0 until [[ "$bootanim" =~ "stopped" ]]; do bootanim=`adb hell getprop init.svc.bootanim 2>&1` echo "$bootanim" if [[ "$bootanim" =~ "not found" ]]; then let "failcounter += 1" if [[ ${failcounter} -gt 30 ]]; then echo "Failed to start emulator" exit 1 fi fi sleep 1 done sleep 30 adb shell input keyevent 82 & sleep 150 echo "Done" } 

    Aggiornamento : Ora che mi ricordo, la mia risposta è corretta in generale ma altre cause causano questo problema, in particolare su android-23, e è ansible che tu continui a vedere lo stesso errore dopo aver usato il mio suggerimento, vedi .

    Non sono sicuro dell'altra questione riguardante il caso android-23, ho bisogno di indagare, ma non sto attualmente utilizzando Travis-ci, solo un test phew. Penso che android-23 non sia preinstallato e che hai bisogno di strumenti di aggiornamento e strumenti di piattaforma, a volte vedo che alcune applicazioni si bloccano quando il mio emulatore api 23 inizia a casa, ecc. È difficile conoscere il motivo senza vederlo, ma è ansible aggiungere i log per cercare di vedere cosa sta succedendo, controlla la mia sceneggiatura per questo.

    Update2 :

    Apri la domanda di stackoverflow e la questione android su questo errore su android-23.

    Update3 :

    Causa: Hardcoded e timeout troppo basso = 5, linea 256

     try { executeShellCommand("am get-config", receiver, 5, TimeUnit.SECONDS); return DeviceConfig.Builder.parse(output); } catch (Exception e) { throw new DeviceException(e); } 

    L'errore è riproducibile localmente:

     08:22:53.761 [ERROR] [org.gradle.BuildExceptionReporter] 08:22:53.795 " Caused by: com.android.ddmlib.ShellCommandUnresponsiveException 08:22:53.795 " at com.android.ddmlib.AdbHelper.executeRemoteCommand(AdbHelper.java:511) 08:22:53.795 " at com.android.ddmlib.AdbHelper.executeRemoteCommand(AdbHelper.java:388) 08:22:53.795 " at com.android.ddmlib.Device.executeShellCommand(Device.java:577) 08:22:53.796 " at com.android.builder.testing.ConnectedDevice.executeShellCommand(ConnectedDevice.java:136) 08:22:53.796 " at com.android.builder.testing.ConnectedDevice.getDeviceConfig(ConnectedDevice.java:256) <-------- 08:22:53.796 " ... 78 more 

    Si prega di stellare questo problema e leggere la soluzione unity3d

    Update4:

    Puoi usare adb come un lavoro in giro, ho provato che funziona su Travis :

     #!/bin/bash ############ ########### ########## ######### ######## ####### ###### ##### #### ### ## # ## ## ACIB SCRIPT ## ############ ########### ########## ######### ######## ####### ###### ##### #### ### ## # # Run android tests function android-test { adb shell input keyevent 82 & ./gradlew assembleDebug -PdisablePreDex ./gradlew assembleDebugAndroidTest -PdisablePreDex adb install app/build/outputs/apk/app-debug.apk adb install app/build/outputs/apk/app-debug-androidTest-unaligned.apk adb shell pm grant com.google.samples.apps.topeka android.permission.SET_ANIMATION_SCALE adb shell am instrument -w -e numShards 6 -e shardIndex 0 -e package com.google.samples.apps.topeka com.google.samples.apps.topeka.test/android.support.test.runner.AndroidJUnitRunner adb shell am instrument -w -e numShards 6 -e shardIndex 1 -e package com.google.samples.apps.topeka com.google.samples.apps.topeka.test/android.support.test.runner.AndroidJUnitRunner adb shell am instrument -w -e numShards 6 -e shardIndex 2 -e package com.google.samples.apps.topeka com.google.samples.apps.topeka.test/android.support.test.runner.AndroidJUnitRunner adb shell am instrument -w -e numShards 6 -e shardIndex 3 -e package com.google.samples.apps.topeka com.google.samples.apps.topeka.test/android.support.test.runner.AndroidJUnitRunner adb shell am instrument -w -e numShards 6 -e shardIndex 4 -e package com.google.samples.apps.topeka com.google.samples.apps.topeka.test/android.support.test.runner.AndroidJUnitRunner adb shell am instrument -w -e numShards 6 -e shardIndex 5 -e package com.google.samples.apps.topeka com.google.samples.apps.topeka.test/android.support.test.runner.AndroidJUnitRunner } 

    Devo risolvere il problema, ma l'installazione ha successo, senza timeout.

    L'Android è un fan Android di Google, tutto su telefoni Android, Android Wear, Android Dev e applicazioni Android Games e così via.