错误:无法找到构建工具修订版26.0.2

时间:2018-02-20 19:33:54

标签: android android-studio gradle android-sdk-tools

我知道这个错误的标题可能看起来很熟悉,但是我很好,我已经做了所有事情来解决问题,但我每次都失败了!所以请帮帮我! 我下载了一个代码和在线商店应用程序,我试图在Android工作室运行它,但发生了以下错误:

错误:无法找到Build Tools修订版26.0.2

" install.build.tools">安装Build Tools 26.0.2并同步项目

现在这就是我所做的: 起初我使用的是android studio v 2.3 我检查了sdk经理并且安装了所有东西, 解决问题我尝试将其更新到最新版本(v 3.0.1) 我手动安装了sdk 26和tools_26.0.2 但错误不会消失! :((

这是我的build.gradle的代码,仔细看看:

apply plugin: 'com.android.application'

android {
compileSdkVersion 26
buildToolsVersion "26.0.2"
defaultConfig {
    applicationId "ir.tameshki.zanbil"
    minSdkVersion 14
    targetSdkVersion 26
    versionCode 2
    versionName "1.1.1"
}
buildTypes {
    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 
'proguard-rules.pro'
    }
}
}

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', 
{
    exclude group: 'com.android.support', module: 'support-annotations'
})
testCompile 'junit:junit:4.12'

// library for user interface
compile 'com.android.support:appcompat-v7:26.0.2'
compile 'com.android.support:cardview-v7:26.0.2'
compile 'com.android.support:recyclerview-v7:26.0.2'
compile 'com.android.support:design:26.0.2'
compile 'com.android.support:support-v4:26.0.2'
compile 'com.balysv:material-ripple:1.0.2'

// library for api
compile 'com.squareup.retrofit2:retrofit:2.1.0'
compile 'com.squareup.okhttp3:logging-interceptor:3.3.1'
compile 'com.squareup.retrofit2:converter-gson:2.1.0'
compile 'com.google.code.gson:gson:2.4'

// glide image loader
compile 'com.github.bumptech.glide:glide:3.7.0'

// firebase notification library
compile 'com.google.firebase:firebase-messaging:9.2.1'

// firebase ads library
compile 'com.google.firebase:firebase-ads:9.2.1'


compile 'uk.co.chrisjenx:calligraphy:2.3.0'
}

apply plugin: 'com.google.gms.google-services'

和我的其他gradle文件:

// Top-level build file where you can add configuration options common to         
all sub-projects/modules.

buildscript {
repositories {
    jcenter()
    maven { url "https://jitpack.io" }
}
dependencies {
    classpath 'com.android.tools.build:gradle:3.0.1'
    classpath 'com.google.gms:google-services:3.0.0'
    // NOTE: Do not place your application dependencies here; they belong
    // in the individual module build.gradle files
}
}

allprojects {
repositories {

    google()
    jcenter()
    maven { url "https://jitpack.io" }
}
}

task clean(type: Delete) {
delete rootProject.buildDir
}

0 个答案:

没有答案
相关问题