Android studio 2.3 gradle构建工具错误 [英] Android studio 2.3 gradle build tools error

查看:116
本文介绍了Android studio 2.3 gradle构建工具错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我生气了,将android studio 2.2更新为2.3后我无法创建和编辑任何项目,因为gradle得到错误:



无法找到构建工具版本26.0.0或任何版本



我从android studio下载了Gradle和构建工具但是没有工作,仍然说不安装。



我的朋友:



 apply plugin:'com.android.application'

android {

compileSdkVersion 26

buildToolsVersion26.0.0
defaultConfig {
applicationIdatys.myapplication
minSdkVersion 16
targetSdkVersion 26
versionCode 1
versionName1.0
testInstrumentationRunnerandroid.support.test.runner .AndroidJUnitRunner
}

buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('prog uard-android.txt'),'proguard-rules.pro'
}
}



 buildscript {
存储库{
jcenter()
}

依赖关系{
classpath'com.android.tools.build:grad:2.3.0'

//注意:不要在此处放置应用程序依赖项;它们在单个模块build.gradle文件中属于
//
}
}

allprojects {
repositories {
jcenter()
}
}

任务清理(类型:删除){
delete rootProject.buildDir
}

dependencies {
}





我尝试过:



更改Android构建工具版本

解决方案

查看此答案



< a href =https://stackoverflow.com/questions/36683726/failed-to-find-build-tools-revision-23-0-1> android - 无法找到Build Tools修订版23.0.1 - Stack Overflow [ ^ ]

I'm getting mad, after updating android studio 2.2 to 2.3 i can't create and edit any project because gradle get error:

Failed to find build tools revision 26.0.0 or any versions


I downloaded Gradle and build tools from android studio also but didn't work and still say not installed.

My 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 {
}



What I have tried:

Changing Android build tools versions

解决方案

Check this answer

android - Failed to find Build Tools revision 23.0.1 - Stack Overflow[^]


这篇关于Android studio 2.3 gradle构建工具错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆