Circle CI timeout on android ./gradlew command

I am struggling to get Circle CI set up with an Android library I have. My issue is that on the command - ./gradlew connectedAndroidTest the test repeatedly times out (I receive the error message “command ./gradlew connectedAndroidTest took more than 10 minutes since last output” at 97%). I have tested this same command from my machine through the Android Studio terminal and it runs in less than 20 seconds each time.

My circle.yml file is as follows:

dependencies:
    pre:
        - echo y | android update sdk --no-ui --all --filter build-tools-25.0.2
        - echo y | android update sdk --no-ui --all --filter extra-android-m2repository
        - echo y | android update sdk --no-ui --all --filter extra-android-support

test:
    pre:
        # start the emulator
        - emulator -avd circleci-android24 -no-audio -no-boot-anim -no-window:
            background: true
            parallel: true
   override:
        # wait for it to have booted
        - circle-android wait-for-boot
        # run tests  against the emulator.
        - ./gradlew connectedAndroidTest
   post:
       # copy the build outputs to artifacts
       - cp -r my_library/build/outputs $CIRCLE_ARTIFACTS
       # copy the test results to the test results directory.
       - cp -r my_library/build/outputs/androidTest-results/* $CIRCLE_TEST_REPORTS

I have tried editing the command as follows:

- (./gradlew connectedAndroidTest):
    timeout: 1200

but this causes the build to fail. How can I stop this command from causing a timeout?

(This is my first time using CI so any other tips in the build file to speed up the process would be greatly appreciated as well)

Looks like my timeout command did not have enough spaces :joy: :gun:

Getting same issue command ./gradlew connectedAndroidTest -PdisablePreDex took more than 10 minutes since last output. It really sucks