有没有办法更新Gradle的版本,因为AIDE中使用的是版本1。
许多函数都不适用。
// 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:1.+'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
jcenter()
}
}发布于 2018-07-01 17:26:17
尝试删除该行:
classpath 'com.android.tools.build:gradle:1.+' 如果这样还不能解决问题,请将此行复制到build.gradle:
classpath 'com.android.tools.build:gradle:3.0.1'发布于 2018-07-01 17:40:56
更新android构建工具至最新版本:
classpath 'com.android.tools.build:gradle:3.1.3'还要在构建脚本中添加google()。所以更新你现有的代码,如下所示:
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.1.3'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
google()
jcenter()
}
}https://stackoverflow.com/questions/45842326
复制相似问题