Hy人,Travis CI Android - 找不到匹配的版本
我想在推送到Github後用Travis測試我的android應用程序。
不幸的是,我有一個問題我解決不了幾天:
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
我的build.gradle包括
dependencies {
compile 'com.google.android.gms:play-services:5.+'
compile 'com.android.support:support-v4:20.+'
}
,這是我.travis.yml文件
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
正如你所看到的,我試圖包括額外的相關存儲庫,但它還沒有工作...
也許你可以看到我的錯,因爲我的想法......
非常感謝你,有一個愉快的一天!
問候