android - 找不到 Android 构建工具 26.1.0

标签 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 studio 上我正在安装 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上。

最佳答案

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

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

关于android - 找不到 Android 构建工具 26.1.0,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49912584/

相关文章:

Android Studio fatal error : CL/cl. h 没有那个文件或目录

android - 我是否需要每个子项目的 gradle 包装器?

Android 通知未通过 TalkBack 播报

java - 已签名的 Apk 不断崩溃

Android 键盘语言问题

android - Gson 发布方法

android - 如何在阿拉伯语中使用 Android TTS

android - Android 中的 GPS 时间

java - Android Studio : Could not determine Java version using executable C:\Program Files\Java\jdk-10\bin\java. 可执行文件