无法更新我的 google 播放服务
Unable to update my google play services
我正在制作一个使用 firebase 身份验证的项目。我登录 activity 但是当我 运行 登录时,它说应用程序不会 运行 直到 Google 播放服务未更新。
以下是我对 app:gradle 文件所做的一些更改。
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'com.google.gms.google-services'
android {
compileSdkVersion 27
defaultConfig {
applicationId "com.devanshisukhija.sicsrattendance"
minSdkVersion 19
targetSdkVersion 27
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
multiDexEnabled true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation "org.jetbrains.kotlin:kotlin-stdlib-jre7:$kotlin_version"
implementation 'com.android.support:appcompat-v7:27.0.2'
implementation 'com.android.support:mediarouter-v7:27.0.2'
implementation 'com.android.support:cardview-v7:27.0.2'
implementation 'com.android.support:design:27.0.2'
implementation 'com.android.support:recyclerview-v7:27.0.2'
implementation 'com.android.support:support-v4:27.0.2'
implementation 'com.google.gms:google-services:3.2.0'
//implementation 'com.google.android.gms:play-services-base:11.4.2'
implementation 'com.google.android.gms:play-services:11.8.0'
implementation 'com.google.firebase:firebase-core:11.8.0'
implementation 'com.google.firebase:firebase-auth:11.8.0'
implementation 'com.google.firebase:firebase-database:11.8.0'
implementation 'com.google.firebase:firebase-auth:11.8.0'
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.1'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
}
apply plugin: "com.google.gms.google-services"
但我仍然收到以下错误:
Error:Execution failed for task ':app:processDebugGoogleServices'.
Please fix the version conflict either by updating the version of the google-services plugin (information about the latest version is available at https://bintray.com/android/android-tools/com.google.gms.google-services/) or updating the version of com.google.android.gms to 11.4.2.
删除构建中的行gradle
apply plugin: 'com.google.gms.google-services'
"com.android.application" 包已经有 'com.google.gms.google-services' 个包。
删除此
apply plugin: 'com.google.gms.google-services'
因为你已经提供了
apply plugin: "com.google.gms.google-services"
所以不需要应用gms.google.services插件。
并添加
classpath 'com.google.gms:google-services:3.0.0'
在项目级构建文件中。
希望对您有所帮助。
我正在制作一个使用 firebase 身份验证的项目。我登录 activity 但是当我 运行 登录时,它说应用程序不会 运行 直到 Google 播放服务未更新。
以下是我对 app:gradle 文件所做的一些更改。
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'com.google.gms.google-services'
android {
compileSdkVersion 27
defaultConfig {
applicationId "com.devanshisukhija.sicsrattendance"
minSdkVersion 19
targetSdkVersion 27
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
multiDexEnabled true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation "org.jetbrains.kotlin:kotlin-stdlib-jre7:$kotlin_version"
implementation 'com.android.support:appcompat-v7:27.0.2'
implementation 'com.android.support:mediarouter-v7:27.0.2'
implementation 'com.android.support:cardview-v7:27.0.2'
implementation 'com.android.support:design:27.0.2'
implementation 'com.android.support:recyclerview-v7:27.0.2'
implementation 'com.android.support:support-v4:27.0.2'
implementation 'com.google.gms:google-services:3.2.0'
//implementation 'com.google.android.gms:play-services-base:11.4.2'
implementation 'com.google.android.gms:play-services:11.8.0'
implementation 'com.google.firebase:firebase-core:11.8.0'
implementation 'com.google.firebase:firebase-auth:11.8.0'
implementation 'com.google.firebase:firebase-database:11.8.0'
implementation 'com.google.firebase:firebase-auth:11.8.0'
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.1'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
}
apply plugin: "com.google.gms.google-services"
但我仍然收到以下错误:
Error:Execution failed for task ':app:processDebugGoogleServices'.
Please fix the version conflict either by updating the version of the google-services plugin (information about the latest version is available at https://bintray.com/android/android-tools/com.google.gms.google-services/) or updating the version of com.google.android.gms to 11.4.2.
删除构建中的行gradle
apply plugin: 'com.google.gms.google-services'
"com.android.application" 包已经有 'com.google.gms.google-services' 个包。
删除此
apply plugin: 'com.google.gms.google-services'
因为你已经提供了
apply plugin: "com.google.gms.google-services"
所以不需要应用gms.google.services插件。 并添加
classpath 'com.google.gms:google-services:3.0.0'
在项目级构建文件中。
希望对您有所帮助。