找不到 ID 为 'com.google.gms.google-services' 的插件 打开文件
Plugin with id 'com.google.gms.google-services' not found Open File
I have followed this link with no success to solving the issue.
和这个Plugin with id 'com.google.gms.google-services' not found
A Screen shot of the error displyed
这是我的build.gradle(模块:app)
apply plugin: 'com.android.application'
android {
compileSdkVersion 29
buildToolsVersion "29.0.1"
defaultConfig {
applicationId "example.technerd.com.firebaseauthentication"
minSdkVersion 16
targetSdkVersion 29
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'androidx.appcompat:appcompat:1.1.0'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test:runner:1.2.0'
implementation 'com.google.firebase:firebase-analytics:17.2.0'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
}
apply plugin: 'com.google.gms.google-services'
这是我的build.gradle(项目:项目名称)
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
//google()
google() // Google's Maven repository
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.4.2'
// classpath 'com.google.gms:google-services:4.3.2'
// classpath 'com.google.gms:google-services:4.3.2'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
// google()
google() // Google's Maven repository
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
我遗漏了什么或者我添加了什么不正确的地方?
请帮我解决这是我的错误。
勾选 official guide:
在您的顶级文件中,您必须添加 google 播放服务插件 com.google.gms:google-services
:
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.4.2'
classpath 'com.google.gms:google-services:4.3.2'
}
}
I have followed this link with no success to solving the issue.
和这个Plugin with id 'com.google.gms.google-services' not found
A Screen shot of the error displyed
这是我的build.gradle(模块:app)
apply plugin: 'com.android.application'
android {
compileSdkVersion 29
buildToolsVersion "29.0.1"
defaultConfig {
applicationId "example.technerd.com.firebaseauthentication"
minSdkVersion 16
targetSdkVersion 29
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'androidx.appcompat:appcompat:1.1.0'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test:runner:1.2.0'
implementation 'com.google.firebase:firebase-analytics:17.2.0'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
}
apply plugin: 'com.google.gms.google-services'
这是我的build.gradle(项目:项目名称)
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
//google()
google() // Google's Maven repository
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.4.2'
// classpath 'com.google.gms:google-services:4.3.2'
// classpath 'com.google.gms:google-services:4.3.2'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
// google()
google() // Google's Maven repository
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
我遗漏了什么或者我添加了什么不正确的地方? 请帮我解决这是我的错误。
勾选 official guide:
在您的顶级文件中,您必须添加 google 播放服务插件 com.google.gms:google-services
:
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.4.2'
classpath 'com.google.gms:google-services:4.3.2'
}
}