【问题标题】:Can't find Android Build Tools 26.1.0找不到 Android 构建工具 26.1.0
【发布时间】:2018-04-19 04:10:40
【问题描述】:

今天早些时候,我发布了一个关于我的 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 上。

【问题讨论】:

  • 与问题分享您的build.Gradle
  • 抱歉完全忘记添加了
  • 我修好了!!!!!!
  • @SamWilson 请发布解决方案然后

标签: android android-studio


【解决方案1】:

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

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

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2022-11-16
    • 1970-01-01
    • 1970-01-01
    • 2013-05-20
    • 2016-07-12
    • 2016-01-14
    • 2018-09-18
    • 1970-01-01
    相关资源
    最近更新 更多