簡體   English   中英

ID為'com.google.gms.google-services'的錯誤插件沒有最新的類路徑

[英]Error Plugin with id 'com.google.gms.google-services' not foun with latest classpath

我知道這里已經被問過很多次了,但是無論我搜索了多少答案,自從我將android studio更新到新的穩定版本以來,它一直在發生。

我已經更新了每個SDK工具,並確認已安裝Google Play服務。 我什至已經使用類路徑3.0.0和3.1.0以及許多Firebase編譯版本進行了測試,但是仍然會發生,而且我不知道該怎么做。

更新:

由於某些兼容性問題,將gradle更新到v3之后又將其還原為2.3.3之后,出現了此錯誤

我注意到有人報告說相同的錯誤告訴他們它已嘗試在某些存儲庫中尋找插件,但我的卻沒有 在此處輸入圖片說明

這是我的構建配置:

// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
    repositories {
        jcenter()
        google()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:2.3.3'
        classpath 'com.google.gms:google-services:3.1.0'
    }
}

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

task clean(type: Delete) {
    delete rootProject.buildDir
}

和項目一:

apply plugin: 'com.android.application'

android {
    compileSdkVersion 25
    buildToolsVersion "25.0.3"
    defaultConfig {
        applicationId "com.appsr.appname"
        minSdkVersion 18
        targetSdkVersion 25
        versionCode 122
        versionName "2.2.2"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
        vectorDrawables.useSupportLibrary = true
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

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:25.4.0'
    compile 'com.android.support.constraint:constraint-layout:1.0.2'
    compile 'com.android.support:design:25.4.0'
    compile 'com.android.support:support-vector-drawable:25.4.0'
    compile 'com.android.support:recyclerview-v7:25.4.0'
    compile 'com.android.support:cardview-v7:25.4.0'

    //Preferences
    compile 'com.android.support:preference-v7:25.4.0'
    compile 'com.takisoft.fix:preference-v7:25.4.0.0' //Bugfix preference library

    //HttpClient
    compile 'com.squareup.okhttp3:okhttp:3.8.1'
    compile 'com.github.franmontiel:PersistentCookieJar:v1.0.1'
    compile 'org.jsoup:jsoup:1.9.2'

    //Serialize classes in JSON
    compile 'com.google.code.gson:gson:2.8.0'

    //Others
    compile 'com.google.android.gms:play-services-drive:11.6.2'
    compile 'com.google.firebase:firebase-core:11.6.2'
    compile 'com.google.firebase:firebase-crash:11.6.2'
    compile 'com.google.firebase:firebase-messaging:11.6.2'
    testCompile 'junit:junit:4.12'
}


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

通過重新啟動Android Studio進行了修復,似乎是在更改某些Gradle屬性時發生的IDE怪異錯誤

暫無
暫無

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

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