以下是我的gradle-wrapper.properties
#Wed Apr 10 15:27:10 PDT 2013
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=../gradle-2.13-all.zip
以下build.gradle
buildscript {
repositories {
mavenCentral();
jcenter()
}
// Switch the Android Gradle plugin version requirement depending on the
// installed version of Gradle. This dependency is documented at
// http://tools.android.com/tech-docs/new-build-system/version-compatibility
// and https://issues.apache.org/jira/browse/CB-8143
dependencies {
classpath 'com.android.tools.build:gradle-2.13-all'
}
}
// Allow plugins to declare Maven dependencies via build-extras.gradle.
allprojects {
repositories {
mavenCentral();
jcenter()
}
}
task wrapper(type: Wrapper) {
gradleVersion = '2.13'
}
答案 0 :(得分:1)
从
更改当前的依赖关系类路径dependencies {
classpath 'com.android.tools.build:gradle-2.13-all'
}
到
dependencies {
classpath 'com.android.tools.build:gradle:2.1.0'
}
如果这不能解决您的问题,请告诉我。
答案 1 :(得分:0)
对于其他迟到的人,只需在android studio中的$(Project_Root)\ platforms \ android下打开您的android项目。然后android studio将负责下载所有正确的依赖项。