升级到Android Studio 0.4.0版本后,编译我的项目时出现以下错误:
A problem occurred configuring project ':muve'.
> Could not resolve all dependencies for configuration ':muve:classpath'.
> Could not resolve com.android.tools.build:gradle:0.7.+.
Required by:
MUVE:muve:unspecified
> Failed to list versions for com.android.tools.build:gradle:0.7.+.
> Could not list versions using M2 pattern 'http://repo1.maven.org/maven2/[organisation]/[module]/[revision]/[artifact]-[revision](-[classifier]).[ext]'.
> Could not GET 'http://repo1.maven.org/maven2/com/android/tools/build/gradle/'.
> Network is unreachable: connect
我的 build.gradle 文件如下:
buildscript {
repositories {
maven { url 'http://repo1.maven.org/maven2' }
}
dependencies {
classpath 'com.android.tools.build:gradle:0.7.+'
}
}
apply plugin: 'android'
repositories {
mavenCentral()
}
android {
compileSdkVersion 18
buildToolsVersion "19.0.0"
defaultConfig {
minSdkVersion 11
targetSdkVersion 18
versionCode 1
versionName "1.0"
}
buildTypes {
release {
runProguard false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
}
}
}
dependencies {
compile 'com.android.support:appcompat-v7:+'
}
我对如何解决这个问题感到无助,非常感谢任何帮助。
谢谢
mavenCentral()
...дёҚзҹҘйҒ“е®ғжҳҜеҗҰзӯүеҗҢдәҺmaven { url 'http://repo1.maven.org/maven2' }
гҖӮ - Maarten