找不到Android API 26平台,无法下载套件 [英] Android API 26 Platform not found, package not available for download

查看:82
本文介绍了找不到Android API 26平台,无法下载套件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是在我升级Android Studio之后发生的。我已经尝试过所有类似的关于堆栈溢出的答案,以及其他一些晦涩的论坛,但是由于出现此错误我一无所获,并且已经做了6个小时。我也曾与sdk工具管理器混为一谈,但是我什么也没得到。哦,这才是新鲜事,可以通过类似的答案尝试。

This occurred after I upgraded my android studio. I've attempted all similar answers on stack overflow, and a few other obscure forums, but I'm not getting anywhere with this error and I've been at it for 6 hours. I've monkeyed around with the sdk tools manager as well, but I'm not getting anywhere. Oh, and that maven thing is new, tried it from a similar answer.

这是我的gradle文件:

Here is my gradle file:

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'


推荐答案

使用25.0.3版时,如果您必须从26版android向后迁移到25版,则可能不得不将某些视图重铸为文本视图。

use version 25.0.3, you may have to recast some views to text views when if you have to migrate backward from version 26 android to 25.

这篇关于找不到Android API 26平台,无法下载套件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆