当前位置: 首页 > 知识库问答 >
问题:

错误插件,ID为“网站.谷歌.gms.谷歌服务”,而不是与最新的类路径无关

华星剑
2023-03-14

我知道在这里已经被问了很多次了,但无论我搜索了多少答案,自从我将android工作室更新到新的稳定版本以来,它一直在发生。

我已经更新了每一个SDK工具,并确认安装了Google Play Services。我甚至用类路径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'

共有1个答案

薛烨
2023-03-14

通过重新启动Android Studio修复,似乎是IDE中更改某些Gradle属性时发生的一个奇怪错误

 类似资料:
  • 最终解决方案 我只是个白痴。增加版本后的真正问题是,我已经应用了插件而不是在文件末尾。检查这个主题,我之前搜索得很糟糕 原始问题 我从来都不明白Gradle是怎么工作的,很抱歉问了一些愚蠢的问题。 我正面临一个问题,我不知道问题出在哪里,也不知道现在该怎么办。我有GCM的应用程序,一切都很好,直到我们添加了第二语言的应用程序。 然后我得到一个错误,即< code>google_app_id没有被翻

  • 问:有可能为谷歌云从Terraform创建以存储域为中心的存储/桶吗?

  • 根据这个SO线程,我知道存在版本冲突,但在谷歌发布新版本后,问题仍然存在。 错误:任务': app: Process DebugGoogleServices'执行失败。请通过更新google-service插件的版本(有关最新版本的信息可在https://bintray.com/android/android-tools/com.google.gms.google-services/获得)或将co

  • 当我在我的服务器上用wget、curl或python爬行谷歌搜索引擎时,我遇到了一个非常奇怪的问题。Google将我重定向到以[ipv4 | ipv6]开头的地址。谷歌。fr/抱歉/索引重定向。。。最后发送503错误,服务不可用。。。 有时抓取工作正常,有时不是在白天,我尝试了几乎所有可能的方法:强制ipv4/ipv6而不是主机名、引用者、用户代理、vpn、. com/. fr/、代理和tor,.

  • 上述代码的结果是: 已打开。服务帐户客户端 ID 在 GSuite 中使用适当的作用域进行授权。 服务帐户适用于普通凭据。它只适用于委托凭证。 我在我们的域中尝试了不同的API(范围)和不同的用户。 我有一个同事试图从头开始编写一个样本,他得到了同样的东西。

  • 我收到了这个错误 已经跟踪了https://developers.google.com/admin-sdk/directory/v1/guides/delegation 我使用这个库,并在laravel 5.7:https://github.com/spatie/laravel-google-calendar上运行它 有什么办法可以解决这个问题。请帮忙。