【发布时间】:2016-02-27 08:09:50
【问题描述】:
我刚刚更新了我的安卓工作室。当前版本是Android Studio 2.0 Preview 6。但是,我收到了这篇文章标题中描述的消息。 我尝试在 gradle 文件的依赖项中使用 gradle 版本,但没有任何反应。这是我的文件。
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.0.0-alpha6'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
为了解决问题,我应该输入 gradle 的任何特定值吗?有些人通过使用 gradle:1.5.0 的版本来修复它。
谢谢
【问题讨论】:
-
是否为所有子模块设置了相同的 gradle 版本
2.0.0-alpha6? -
我不确定。你说如何找到子模块?应该去哪里?
-
在您的项目视图中选择“Android”演示文稿并展开“Gradle Scripts”部分/您将看到您项目的所有 build.gradles。
标签: android android-studio gradle