Android Build only works on "Rebuild with SSH"

ssh
android

#1

Hey Guys,

My Android build is only running successfully when I rebuild with SSH.
If I do it normally, it times out and dies while executing JUnit Tests.
I`m not doing any connected tests (only JUnit tests with Robolectric).

Can you help me?

Thanks,

My circle.yml:

general:
  artifacts:
   - "app/build/reports/jacoco"
machine:
  java:
    version: openjdk8
dependencies:
  pre:
    - bundle install
    - echo y | android update sdk --no-ui --all --filter "android-25"
    - 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"

  cache_directories:
    - /usr/local/android-sdk-linux/platforms/android-25
    - /usr/local/android-sdk-linux/build-tools/25.0.2
    - /usr/local/android-sdk-linux/extras/android/m2repository

test:
  override:
    - ./gradlew testCI
    - bundle exec danger --verbose
  post:
    - mkdir -p $CIRCLE_TEST_REPORTS/junit/
    - find . -type f -regex ".*/build/test-results/.*xml" -exec cp {} $CIRCLE_TEST_REPORTS/junit/ \;
    - mkdir -p $CIRCLE_ARTIFACTS/junit-report/
    - cp -r app/build/reports/tests/testDebugUnitTest/* $CIRCLE_ARTIFACTS/junit-report/
    - mkdir -p $CIRCLE_ARTIFACTS/lint/
    - cp -r app/build/reports/lint/lint* $CIRCLE_ARTIFACTS/lint/

#2

Can you give me a link to a build?


#3

https://circleci.com/gh/loadsmart/liveloads-android/131
This was the one I started with SSH and worked.
https://circleci.com/gh/loadsmart/liveloads-android/130
This was the one that froze while running tests.


#4