无法找到Build Tools修订版27.1.1。当我尝试下载时,说它没有下载链接:

时间:2018-04-19 13:00:14

标签: android maven build build.gradle build-tools

这是我的build.gradle文件:

buildscript {
repositories {
    google()
    maven { url 'https://maven.fabric.io/public' }
    maven { url 'https://maven.google.com' }
    maven { url 'http://dl.bintray.com/amulyakhare/maven' }
    maven { url 'https://jcenter.bintray.com/' }
    maven { url "https://jitpack.io" }
    mavenCentral()
}

dependencies {
    classpath 'io.fabric.tools:gradle:1.+'
    classpath "io.realm:realm-gradle-plugin:3.2.0"
    classpath 'com.google.gms:google-services:3.1.0' // google-services plugin
}
}
apply plugin: 'com.android.application'
apply plugin: 'io.fabric'
apply plugin: 'realm-android'

repositories {
google()
maven { url 'https://maven.fabric.io/public' }
maven { url 'http://dl.bintray.com/amulyakhare/maven' }
maven { url 'https://jcenter.bintray.com/' }
maven { url "https://jitpack.io" }
maven {
    url 'https://maven.google.com'
}
}


android {
compileSdkVersion 27
buildToolsVersion '27.1.1'
defaultConfig {
    applicationId "nl.hgrams.passenger"
    minSdkVersion 17
    targetSdkVersion 23
    versionCode 905
    versionName '3.2'
    multiDexEnabled true
}
sourceSets {
    main {
        java {
            exclude 'nl.hgrams.passenger.activities.PSSimilarTripsGroupActivity'
            exclude 'nl.hgrams.passenger.activities.PSTripStatsActivity'
        }
    }
}
lintOptions {
    checkReleaseBuilds false
    abortOnError false
}
dexOptions {
    preDexLibraries = false
    javaMaxHeapSize "4g"
}
packagingOptions {
    exclude 'META-INF/services/javax.annotation.processing.Processor'
    exclude 'META-INF/LICENSE'
    exclude 'META-INF/NOTICE'
}
buildTypes {
    release {
        minifyEnabled false
        shrinkResources false
        ext.enableCrashlytics = true
        ext.betaDistributionReleaseNotesFilePath = "/Users/gopublic/bamboo-home/xml-data/build-dir/131073/PAS-PAD-VRANDROID/changelog.txt"
        ext.betaDistributionEmails = "alin.rosu@100grams.nl, pedro.amanhui@100grams.nl, 100gramstest@gmail.com"
        ext.betaDistributionGroupAliases = "passenger-android-beta"

    }

    debug {
        minifyEnabled false
        shrinkResources false
        ext.enableCrashlytics = true
        ext.betaDistributionEmails = "alin.rosu@100grams.nl, pedro.amanhui@100grams.nl, 100gramstest@gmail.com"
        ext.betaDistributionReleaseNotesFilePath = "/Users/gopublic/bamboo-home/xml-data/build-dir/131073/PAS-PAD-VRANDROID/changelog.txt"
        ext.betaDistributionGroupAliases = "passenger-android-beta"

    }
}
}

dependencies {
implementation 'com.android.support:multidex:1.0.0'
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:27.1.1'
implementation 'com.android.support:design:27.1.1'
implementation 'com.android.support:percent:27.1.1'
implementation 'com.android.support:recyclerview-v7:27.1.1'
implementation 'com.android.support:transition:27.1.1'
implementation 'com.google.code.gson:gson:2+'
implementation 'com.android.volley:volley:1+'
implementation 'com.squareup.okhttp:okhttp:2.0.0+'
implementation 'com.jakewharton:butterknife:8.8.1'
annotationProcessor 'com.jakewharton:butterknife-compiler:8.8.1'
implementation 'com.google.android.gms:play-services-maps:11.8.0'
implementation 'com.google.android.gms:play-services-location:11.8.0'
implementation 'com.google.android.gms:play-services-gcm:11.8.0'
implementation 'com.google.android.gms:play-services-analytics:11.8.0'
implementation 'com.google.android.gms:play-services-auth:11.8.0'
implementation 'com.google.firebase:firebase-core:11.8.0'
implementation 'com.google.firebase:firebase-storage:11.8.0'
implementation 'com.google.firebase:firebase-auth:11.8.0'
implementation 'com.google.firebase:firebase-messaging:11.8.0'
implementation files('libs/nineoldandroids-2.4.0.jar')
implementation files('libs/okhttp-urlconnection-2.0.0.jar')
implementation 'com.edmodo:cropper:1.0.1'
implementation 'com.squareup.picasso:picasso:2.5.2'
implementation 'com.makeramen:roundedimageview:2.3.0'
implementation 'com.google.maps.android:android-maps-utils:0.4+'
implementation 'com.instabug.library:instabug:4.2.6'
implementation 'io.reactivex:rxjava:1.1.0'
implementation 'com.plattysoft.leonids:LeonidsLib:1.3.1'
implementation 'io.smooch:core:latest.release'
implementation 'io.smooch:ui:latest.release'
implementation "com.daimajia.swipelayout:library:1.2.0@aar"
implementation 'com.squareup.okhttp3:okhttp:3.2.0'
implementation 'com.squareup.retrofit:retrofit:1.9.0'
implementation 'com.bartoszlipinski:recyclerviewheader2:2.0.1'
implementation 'io.branch.sdk.android:library:2.+'
implementation 'com.github.2359media:EasyAndroidAnimations:0.8'
implementation 'me.grantland:autofittextview:0.2.+'
implementation 'com.github.kaknazaveshtakipishi:PermissionEverywhere:1.0.2'
implementation('com.crashlytics.sdk.android:crashlytics:2.8.0@aar') {
    transitive = true;
}
implementation(
        [group: 'com.fasterxml.jackson.core', name: 'jackson-core', version: '2.4.1'],
        [group: 'com.fasterxml.jackson.core', name: 'jackson-annotations', version: '2.4.1'],
        [group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: '2.4.1']
)
implementation 'devlight.io:navigationtabbar:1.2.5'
implementation 'org.apache.commons:commons-lang3:3.4'
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
implementation 'com.yahoo.mobile.client.android.util.rangeseekbar:rangeseekbar-library:0.1.0'
implementation 'commons-io:commons-io:2.4'
implementation 'com.facebook.android:facebook-android-sdk:[4,5)'
}

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

我收到此错误:

Failed to find Build Tools revision 27.1.1
Install Build Tools 27.1.1 and sync project

如果我按下安装构建工具27.1.1。我无法下载错误:

https://s3.amazonaws.com/uploads.hipchat.com/39260/829560/ECeAJ5Gi0GQnjoZ/upload.png

为什么会这样?它曾经与26.1.1一起工作,但现在我更新到Android Studio 3.1,它不允许我使用该版本,说27.0.3是最小的工作。但尝试使用27.0.3和27.1.1并且我总是遇到编译错误

2 个答案:

答案 0 :(得分:12)

参考official documentation,实际版本为:

android {
    buildToolsVersion "27.0.3"
    ...
}

而不是27.1.1

所以,用

修复你的android节点
android {
  compileSdkVersion 27
  buildToolsVersion '27.0.3'
   .....

答案 1 :(得分:3)

根据Android SDK管理器,最新版本的构建工具是27.0.3和28.0.0-rc1。

27.1.1是支持库版本。