0

I am getting the below mentioned error while building android projects on travis.

Could not determine the dependencies of task ':projectname:packageDebug'.

My travis.yml looks like below:-

language: java
jdk: oraclejdk7
env:
 matrix:
   - ANDROID_TARGET=android-19  ANDROID_ABI=armeabi-v7a
before_install:
 # Install base Android SDK
 - sudo apt-get update -qq
 - chmod +x gradlew
 - if [ `uname -m` = x86_64 ]; then sudo apt-get install -qq --force-yes libgd2-xpm ia32-libs ia32-libs-multiarch > /dev/null; fi
 - wget http://dl.google.com/android/android-sdk_r22.3-linux.tgz
 - tar xzf android-sdk_r22.3-linux.tgz
 - export ANDROID_HOME=$PWD/android-sdk-linux
 - export PATH=${PATH}:${ANDROID_HOME}/tools:${ANDROID_HOME}/platform-tools

# Install required components.
# For a full list, run `android list sdk -a --extended`
# Note that sysimg-19 downloads only ARM, because only the first license query is accepted.
- echo yes | android update sdk --filter platform-tools --no-ui --force > /dev/null
- echo yes | android update sdk --all --filter build-tools-19.0.0 --no-ui --force > /dev/null
- echo yes | android update sdk --filter android-19 --no-ui --force > /dev/null
- echo yes | android update sdk --filter sysimg-19 --no-ui --force > /dev/null
- echo yes | android update sdk --filter extra-android-support --no-ui --force > /dev/null
- echo yes | android update sdk --filter extra-android-m2repository --no-ui --force > /dev/null

and my buid.gradle looks like below:-

    apply plugin: 'android'
apply plugin: 'hugo'

android {
    compileSdkVersion 19
    buildToolsVersion "19.0.2"

    defaultConfig {
        minSdkVersion 19
        targetSdkVersion 19
        versionCode 1
        versionName "1.0"
    }
    buildTypes {
        release {
            runProguard false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
        }
    }
     } 
     dependencies {
    compile 'com.android.support:appcompat-v7:19.0.1'
    compile 'com.android.support:support-v4:19.0.1'
    compile 'com.squareup.picasso:picasso:2.2.0'
    compile 'com.squareup.retrofit:retrofit:1.4.1'
    compile 'com.jakewharton.timber:timber:2.2.2'
    compile 'com.netflix.rxjava:rxjava-core:0.16.1'
    compile 'com.netflix.rxjava:rxjava-android:0.16.1'
    compile 'com.etsy.android.grid:library:1.0.3'
    compile 'com.romainpiel.shimmer:library:1.2.0@aar'
    debugCompile 'com.squareup.retrofit:retrofit-mock:1.4.1'
    compile fileTree(dir: 'libs', include: ['*.jar'])
    }

Would anyone know what I am doing wrong...

EDIT:- the link to travis build :- The Travis build for the app

Rasmus
  • 8,248
  • 12
  • 48
  • 72

1 Answers1

0

The error on the travis-ci build you linked to failed for a different reason then you specified at the top of your question. In line 46 Travis throws the error:

echo yes | android update sdk --filter sysimg-19 --no-ui --force > /dev/null

No output has been received in the last 10 minutes, this potentially indicates a stalled build or something wrong with the build itself.

In your case, this seems to mean one of two things:

  1. Installing that part of the SDK takes longer than 10 minutes, and since you route all output to null Travis kills the build for having no output.

  2. Installing that part of the SDK crashed and hung.

Either way, I would recommend removing the pipe to /dev/null so that Travis will see output and not kill the build and if the install crashes you can see why.

This probably won't solve your problem but it's a start to getting a working build. Let me know off you still have problems after this.

kenorb
  • 155,785
  • 88
  • 678
  • 743
joshua-anderson
  • 4,458
  • 5
  • 35
  • 56