我有一个项目有两个模块。 第一个模块(库模块)具有以下依存关系: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'
}
第二个模块(应用模块)具有这些的:
dependencies {
compile 'com.android.support:appcompat-v7:25.1.1'
compile project(":library-module-above")
}
这是我.travis.yml文件:
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组件是否得到纠正?或者还有其他我错过的东西?
编辑
约“找不到符号”并没有停止建造错误。 我有没有注意到有关许可证的错误:
* 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].
我写在答案的解决方案。
请发布Travis CI日志中的确切错误消息。 –
@ Code-Apprentice我在Travis的官方Github页面上找到了解决方案,所以我给这些参考添加了一个答案。不管怎么说,还是要谢谢你。 –
您仍然应该使用错误消息编辑您的问题,以使其对未来访问者更有用。 –