由于某些原因,travis build很难解决依赖问题。
A problem occurred configuring project ':app'.
Could not resolve all dependencies for configuration ':app:_debugApk'.
A problem occurred configuring project ':mortar'.
Could not resolve all dependencies for configuration ':mortar:classpath'.
Cannot resolve external dependency com.android.tools.build:gradle:2.2.2 because no repositories are defined.
Required by:
mortar-evolution-stone:mortar:unspecified发布于 2017-02-11 14:32:04
无法解析外部依赖com.android.tools.build:gradle:2.2.2,因为未定义存储库
在mortar/build.gradle中,您没有存储库。
buildscript {
dependencies {
classpath 'com.android.tools.build:gradle:2.2.2'
}
}但是,你不应该在那里需要它...你的/build.gradle可以设置它。
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.2.2'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
// *** Add this *** //
buildscript {
repositories {
jcenter()
}
}
repositories {
jcenter()
}
}实际上,您根本不需要在代码库中使用mortar。
app/build.gradle
dependencies {
...
// compile project(':mortar') // ** Remove this ** //
compile 'com.squareup.mortar:mortar:(latest version)'
}https://stackoverflow.com/questions/42173017
复制相似问题