我收到此错误消息
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/ ) 或将 com.google.android.gms 版本更新至 11.0.4。
block 引用>我的等级
apply plugin: 'com.android.application' android { compileSdkVersion 26 defaultConfig { applicationId "com.books.mrwan.qasswanwadar" minSdkVersion 17 targetSdkVersion 26 versionCode 1 versionName "1.0" testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" vectorDrawables.useSupportLibrary = true } buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } } } dependencies { implementation fileTree(dir: 'libs', include: ['*.jar']) implementation 'com.android.support:appcompat-v7:26.1.0' implementation 'com.android.support:design:26.1.0' implementation 'com.android.support.constraint:constraint-layout:1.1.0' implementation 'com.android.support:support-vector-drawable:26.1.0' 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' compile 'com.google.firebase:firebase-database:11.4.2' compile 'com.google.firebase:firebase-core:11.4.2' compile 'com.google.firebase:firebase-ads:11.0.0' compile 'com.google.firebase:firebase-messaging:11.0.4' compile 'com.google.android.gms:play-services-maps:11.0.4' compile 'com.google.android.gms:play-services-location:11.0.4' } apply plugin: 'com.google.gms.google-services'
我做错了什么?
最佳答案
尝试改变这个词compile
至implementation
并将google库的所有版本更改为15.0.0
示例:
implementation 'com.google.firebase:firebase-database:15.0.0'
应该可以工作。
关于java - Gradle 问题 - 错误 :Execution failed for task,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50239133/