Hy people,
I'd like to test my android application with Travis after pushing to Github.
Unfortunately, I have an issue I can't solve for days:
Could not resolve all dependencies for configuration ':app:_defaultFlavorDebugCompile'.
> Could not find any version that matches com.google.android.gms:play-services:5.+.
Required by:
weightlifting_app_schwedt:app:unspecified
> Could not find any version that matches com.android.support:support-v4:20.+.
Required by:
weightlifting_app_schwedt:app:unspecified
My build.gradle includes
dependencies {
compile 'com.google.android.gms:play-services:5.+'
compile 'com.android.support:support-v4:20.+'
}
and this is my .travis.yml file
language: java
jdk: oraclejdk7
before_install:
- sudo apt-get update -qq
- if [ `uname -m` = x86_64 ]; then sudo apt-get install -qq --force-yes libgd2-xpm ia32-libs ia32-libs-multiarch; fi
- wget http://dl.google.com/android/android-sdk_r21.0.1-linux.tgz
- tar -xzf android-sdk_r21.0.1-linux.tgz
- export ANDROID_HOME=$PWD/android-sdk-linux
- export PATH=${PATH}:${ANDROID_HOME}/tools:${ANDROID_HOME}/platform-tools
- android list sdk --all
- chmod +x gradlew
- android update sdk --filter platform-tools,android-16,android-17,sysimg-17 --no-ui --force
- android update sdk --filter extra-android-support --no-ui --force > /dev/null
- android update sdk --filter extra-android-m2repository --no-ui --force > /dev/null
- android update sdk --filter extra-google-m2repository --no-ui --force > /dev/null
- android update sdk --no-ui --all --filter 1,2
As you can see, I tried to include additional, associated repositories but it doesn't work yet ...
Maybe you can see my mistake because I'm out of ideas...
Thank you very much and have a nice day!
Best regards
Updated response:
VM images already include fixed android-wait-for-emulator script and android SDK tools version 24.0.0 and the components your build require by default.
Build Environment Updates - 2014-12-09
Old response:
Run update tools = 1 before the other components, so you get the latest revisions and add the missing components extra-google-google_play_services and the build-tools revision you configured on your project.
Or custom this sample
On older versions of Travis you may have needed to add
android update sdk ...
.On current version, you can just tell Travis to include some additional components. Specifically you need to add:
You can read more here.
Oddly you don't need to add
extra-google-google_play_services
. I just tested this when depending oncom.google.android.gms:play-services-wallet