按照http://developer.android.com/samples/index.html中的步骤,我将repeatingAlarm (http://developer.android.com/samples/repeatingAlarm/project.html)项目导入到Android中。不幸的是,下面出现了一个错误:
未能刷新Gradle项目'repeatingAlarm‘该项目使用的是一个不受支持的Android插件版本(0.6.3)。修复插件版本和重新导入项目Quick失败,无法在build.gradle文件中找到对Android插件的任何引用。请单击该链接执行文本搜索,然后手动更新生成文件。
下面是build.gradle文件:
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:0.6.+'
}
}
apply plugin: 'android'
dependencies {
// Add the support lib that is appropriate for SDK 4
compile "com.android.support:support-v4:18.0.+"
}
// The sample build uses multiple directories to
// keep boilerplate and common code separate from
// the main sample code.
List<String> dirs = [
'main', // main sample code; look here for the interesting stuff.
'common', // components that are reused by multiple samples
'template'] // boilerplate code that is generated by the sample template process
android {
compileSdkVersion 19
buildToolsVersion "18.0.1"
sourceSets {
main {
dirs.each { dir ->
java.srcDirs "src/${dir}/java"
res.srcDirs "src/${dir}/res"
}
}
instrumentTest.setRoot('tests')
instrumentTest.java.srcDirs = ['tests/src']
}
}在这里IDE告诉我这样一个错误:

我该怎么做?
发布于 2014-09-23 08:52:30
将buildToolsVersion "18.0.1“更改为最新版本,如"20.0.1",它将工作:)
https://stackoverflow.com/questions/21583277
复制相似问题