Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/angular/30.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Android 在以下任何来源中均未找到插件[id:';com.google.gms.google services';]_Android_Android Gradle Plugin_Google Play Services - Fatal编程技术网

Android 在以下任何来源中均未找到插件[id:';com.google.gms.google services';]

Android 在以下任何来源中均未找到插件[id:';com.google.gms.google services';],android,android-gradle-plugin,google-play-services,Android,Android Gradle Plugin,Google Play Services,我在project gradle获得了此版本的无错误: classpath 'com.google.gms:google-services:4.3.5' 但是当我切换到4.3.7时: Plugin [id: 'com.google.gms.google-services'] was not found in any of the following sources: * Try: Run with --info or --debug option to get more log output

我在project gradle获得了此版本的无错误

classpath 'com.google.gms:google-services:4.3.5'
但是当我切换到4.3.7时:

Plugin [id: 'com.google.gms.google-services'] was not found in any of the following sources:

* Try:
Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Exception is:
org.gradle.api.plugins.UnknownPluginException: Plugin [id: 'com.google.gms.google-services'] was not found in any of the following sources:

- Gradle Core Plugins (plugin is not in 'org.gradle' namespace)
- Plugin Repositories (plugin dependency must include a version number for this source)
应用程序渐变以开头(错误来自第4行):

gradle项目始于:

buildscript {
    ext.kotlin_version = '1.5.0'
    repositories {
        google()
        mavenCentral()
        maven { url 'https://dl.bintray.com/kotlin/kotlin-eap' }
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:4.2.1'
        classpath 'com.google.gms:google-services:4.3.7'
        classpath "com.getkeepsafe.dexcount:dexcount-gradle-plugin:2.1.0-RC01"
        classpath "com.google.firebase:perf-plugin:1.4.0"
        classpath "com.google.firebase:firebase-crashlytics-gradle:2.6.1"
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
    }
}
在Google maven repository中,这个版本存在,但我无法以某种方式应用它:


我尝试在gradle wrapper上使用最新的gradle 6.9、7.0和7.0.1。属性使用
classpath'com.google.gms:google services:4.3.5'
而不是版本
4.3.7
可能是库的问题请改用版本
4.3.8
,有关上下文,请参见此

…我认为最新的
gradle插件
存在一些问题。我今天在这上面浪费了两个小时。这能回答你的问题吗?我想我会等到他们把它上传到Maven,而不是Google托管:)现在将使用4.3.5,仍然使用这个旧版本。只是想在最新的版本上……但它会出现在maven repo上吗?
buildscript {
    ext.kotlin_version = '1.5.0'
    repositories {
        google()
        mavenCentral()
        maven { url 'https://dl.bintray.com/kotlin/kotlin-eap' }
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:4.2.1'
        classpath 'com.google.gms:google-services:4.3.7'
        classpath "com.getkeepsafe.dexcount:dexcount-gradle-plugin:2.1.0-RC01"
        classpath "com.google.firebase:perf-plugin:1.4.0"
        classpath "com.google.firebase:firebase-crashlytics-gradle:2.6.1"
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
    }
}