未找到Android API 26平台,无法下载包

时间:2017-08-06 01:17:45

标签: android android-studio build.gradle

Error image.这是在我升级我的android工作室之后发生的。我已经尝试了关于堆栈溢出的所有类似答案,以及其他一些不起眼的论坛,但是我没有遇到任何错误并且我已经在这里遇到了6个小时。我也和sdk工具经理一起闲逛,但我没有到达任何地方。哦,那个maven的东西是新的,从类似的答案中尝试过。

这是我的gradle文件:

android {
    compileSdkVersion 26
    buildToolsVersion "26.0.0"
    defaultConfig {
        applicationId "com.loredylore.lorebuilder"
        minSdkVersion 15
        targetSdkVersion 26
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
        vectorDrawables.useSupportLibrary = true
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    compile fileTree(include: ['*.jar'], dir: 'libs')
    androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
        exclude group: 'com.android.support', module: 'support-annotations'
    })
    compile 'com.android.support:appcompat-v7:26.0.0-alpha1'
    compile 'com.android.support:design:26.0.0-alpha1'
    compile 'com.android.support.constraint:constraint-layout:1.0.2'
    compile 'com.android.support:support-v4:26.0.0-alpha1'
    compile 'com.android.support:support-vector-drawable:26.0.0-alpha1'
    compile 'com.android.support:recyclerview-v7:26.0.0-alpha1'
    compile 'com.google.firebase:firebase-auth:11.0.2'
    compile 'com.google.firebase:firebase-core:11.0.2'
    compile 'com.google.firebase:firebase-database:11.0.2'
    compile 'com.google.firebase:firebase-crash:11.0.2'
    compile 'com.google.firebase:firebase-storage:11.0.2'
    compile 'com.android.support:support-annotations:26.0.0-alpha1'
    //new
    testCompile 'junit:junit:4.12'

}

allprojects {
    repositories {
        jcenter()
        maven {
            url "https://maven.google.com"
        }
    }
}

// Add to the bottom of the file
apply plugin: 'com.google.gms.google-services'

1 个答案:

答案 0 :(得分:1)

使用版本25.0.3,如果必须从版本26 android向后迁移到25,则可能必须将一些视图重新转换为文本视图。