我使用与Android Studio捆绑的Gradle构建系统。到目前为止,我能够使用存储在我的项目结构中的依赖项来构建多项目设置。我现在想使用maven依赖,无济于事。我写了一个非常简单的build.gradle文件,总是失败:
buildscript {
repositories {
maven { url 'http://repo1.maven.org/maven2' }
}
dependencies {
classpath 'com.android.tools.build:gradle:0.4'
}
}
apply plugin: 'android'
dependencies {
compile 'com.google.android:support-v4:r7'
}
android {
compileSdkVersion 17
buildToolsVersion "17.0.0"
defaultConfig {
minSdkVersion 7
targetSdkVersion 16
}
}
与以下消息:
* What went wrong:
A problem occurred configuring project ':absabs'.
> Failed to notify project evaluation listener.
> Could not resolve all dependencies for configuration ':absabs:compile'.
> Could not find com.google.android:support-v4:r7.
Required by:
absabs:absabs:unspecified
....
Caused by: org.gradle.api.internal.artifacts.ivyservice.ModuleVersionNotFoundException: Could not find com.google.android:support-v4:r7.
它发生与我迄今为止所尝试的任何工件。任何想法的什么问题?
谢谢