簡體   English   中英

無法解決:com.google.firebase:firebase-core:9.2.1

[英]Failed to resolve: com.google.firebase:firebase-core:9.2.1

我的SDK經理說一切都是最新的:
Google Play服務:33
Google存儲庫:35

build.gradle內容:

apply plugin: 'com.android.application'

android {
    compileSdkVersion 23
    buildToolsVersion "23.0.3"
    defaultConfig {
        applicationId "com.project.cloudmessagingdemo"
        minSdkVersion 15
        targetSdkVersion 23
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }

    packagingOptions {
        exclude 'META-INF/LICENSE'
        exclude 'META-INF/LICENSE-FIREBASE.txt'
        exclude 'META-INF/notice'
    }
}

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    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:23.4.0'
    compile 'com.google.firebase:firebase-messaging:9.2.1'
    testCompile 'junit:junit:4.12'
}

為什么不編譯?

錯誤圖片

Google存儲庫35包含最新版本-嘗試'com.google.firebase:firebase-messaging:9.6.1'

不幸的是,9.6.1是上周晚些時候發布的補丁程序發行版,因此,並非所有文檔都可能已更新為指向它-抱歉!

在您的SDK中更新您的Google Repository。 在此處輸入圖片說明

文件名build.gradle(項目:“您的應用名稱”)

dependencies {
    classpath 'com.android.tools.build:gradle:2.2.0'
    classpath 'com.google.gms:google-services:3.0.0'
}

在項目中的build.gradle文件中添加“ classpath'com.google.gms:google-services:3.0.0'”行

降級 firebase 版本 。為我工作

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM