1.In build.gradle make sure gradle is set to 0.9.0
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:0.9.0'
}
}
2.In gradle-wrapper.properties make sure to use gradle 1.11
#Wed Apr 10 15:27:10 PDT 2013
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=http\://services.gradle.org/distributions/gradle-1.11-all.zip
3.Sync project with gradle files by pressing the button to the left of the avd button

4.Try to build project again. If still having issues possibly try File > Invalidate Caches/Restart
本文介绍如何通过调整Gradle配置文件来解决Android项目的构建问题。主要包括:确保使用Gradle插件版本0.9.0,使用Gradle 1.11版本,同步项目Gradle文件,并尝试清理缓存重启。
769

被折叠的 条评论
为什么被折叠?



