我很生气,将android studio 2.2更新为2.3后,我无法创建和编辑任何项目,因为gradle会出错:
Failed to find build tools revision 26.0.0 or any versions
我也从Android Studio下载了Gradle并构建了工具,但没有用。
我的gradle:
apply plugin: 'com.android.application'
android {
compileSdkVersion 26
buildToolsVersion "26.0.0"
defaultConfig {
applicationId "atys.myapplication"
minSdkVersion 16
targetSdkVersion 26
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
和:
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.3.0'
// 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
}
dependencies {
}
最佳答案
您应该首先使用SDK Manager更新工具。
看此链接很有帮助。
https://developer.android.com/studio/intro/update.html
如果您的问题无法解决。卸载您的android studio并删除您的Sdk文件夹,然后从此链接重新安装android studio新版本:
https://developer.android.com/studio/index.html
关于android - Android Studio 2.3未能找到构建工具,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44774765/