无法找到Android Build Tools 26.1.0

时间:2018-04-19 04:10:40

标签: android android-studio

今天早些时候我发布了一个关于如何让我的Android应用无法运行的问题。这是错误:

Error:Failed to find Build Tools revision 26.1.0
<a href="install.build.tools">Install Build Tools 26.1.0 and sync project</a>

我尝试了这个技巧Gradle sync failed: failed to find Build Tools revision 24.0.0 rc1,它没有用,但我意识到在Android工作室我正在安装26.0.1,我在26.1.0中感到困惑。有谁知道如何获得该版本?

在这里查看我原来的问题: In Android studio, I'm getting an error that says "Packages unavailable" and that a package I need is not available

这是我的build.gradle

 apply plugin: 'com.android.application'

android {
compileSdkVersion 26
lintOptions {
    abortOnError false
}
defaultConfig {
    applicationId "com.example.leoconnelly.connexus"
    minSdkVersion 23
    targetSdkVersion 26
    versionCode 1
    versionName "1.0"
    testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    buildToolsVersion '26.1.0'
    //buildToolsVersion "26.0.1"


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

dependencies {

implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:26.1.0'
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.1'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
implementation 'com.android.support:design:26.1.0'
compile 'com.squareup.picasso:picasso:2.5.2'

//Helpshift
// use version 26.1.0 instead of 26.0.2
implementation 'com.android.support:recyclerview-v7:26.1.0'
implementation 'com.android.support:cardview-v7:26.1.0'

implementation('com.helpshift:android-helpshift-en-aar:6.4.2') {
    exclude group: 'com.android.support'
    exclude module: 'design'
    exclude module: 'recyclerview'
    exclude module: 'cardview-v7'

}


}

我也在Mac上。

1 个答案:

答案 0 :(得分:2)

更改号码26.0.1我认为没有26.1.0构建工具版本,请参阅此link,并且您在Build.Gradle文件中添加了两次buildToolsVersion。

https://developer.android.com/studio/releases/build-tools.html