2017-02-11 13 views
0

2つのモジュールを持つプロジェクトがあります。Travis CIがサポートの依存関係に失敗しました

dependencies { 
    compile 'com.android.support:support-annotations:25.1.1' 
    compile 'com.android.support:support-v4:25.1.1' 
    compile 'com.android.support:recyclerview-v7:25.1.1' 
} 

第二のモジュール(アプリモジュール)があり、これらのもの:これは私の.travis.ymlファイルです

dependencies { 
    compile 'com.android.support:appcompat-v7:25.1.1' 
    compile project(":library-module-above") 
} 

最初のモジュール(ライブラリモジュール)は、これらの依存関係があります。

language: android 
jdk: oraclejdk8 

android: 
    components: 
    - tools 
    - platform-tools 
    - build-tools-25.0.2 
    - android-25 
    - extra-android-m2repository 
    - extra-google-m2repository 
    - extra-android-support 

branches: 
    only: 
    - master 

script: 
    - ./gradlew build connectedCheck --stacktrace 

before_cache: 
    - rm -f $HOME/.gradle/caches/modules-2/modules-2.lock 
    - rm -fr $HOME/.gradle/caches/*/plugin-resolution/ 

cache: 
    directories: 
    - $HOME/.gradle/caches/ 
    - $HOME/.gradle/wrapper/ 
    - $HOME/.android/build-cache 

それがサポートAPI(RecyclerView、を見つけることができないので、トラヴィスのビルドが失敗します、サポート注釈)。

私のローカルマシンで同じコマンド(./gradlew build connectedCheck --stacktrace)を実行すると、ビルドはすべてのシンボルを検出するエラー0で渡されます。

私のTravisコンポーネントは修正されていますか?それとも、私が見逃したことがありますか?

EDIT

ビルドを停止していない「のシンボルを見つけることができません」というエラー。 私は、ライセンスに関するエラーに気付かなかったしました:

* What went wrong: 
A problem occurred configuring project ':app'. 
> You have not accepted the license agreements of the following SDK components: 
    [Android SDK Build-Tools 25.0.2, Android SDK Platform 25]. 

私は答えでソリューションを書きました。

+0

正確なエラーメッセージをTravis CIログから送信してください。 –

+0

@ Code-Apprentice TravisのGithubの公式ページで解決策を見つけました。とにかくありがとう。 –

+0

将来の訪問者にこれをより便利にするために、エラーメッセージで質問を編集する必要があります。 –

答えて

1

別のtoolsコンポーネントを追加して解決しました。 私は、公式のTravis Githubのページで解決策を見つけました。ここで

https://github.com/travis-ci/docs-travis-ci-com/issues/779

そして、ここで:https://github.com/travis-ci/travis-ci/issues/6801

私の最後の.travis.ymlコンポーネントは次のとおりです。

components: 
    - tools 
    - platform-tools 
    - tools # used above api 25.x 
    - build-tools-25.0.2 
    - android-25 
    - extra-android-support 
    - extra-android-m2repository 
    - extra-google-m2repository 

は今、すべてが正常に動作します。

+0

あなたは 'tools'を2回リストアップしました。それは慎重ですか? – Armand

+0

@Armandはい、TravisのGithubページで見つけることができます –

関連する問題