简体   繁体   English

org.gradle.api.GradleException:请修复版本冲突

[英]org.gradle.api.GradleException: Please fix the version conflict either

I'm building an android app with Firebase and Maps APIs but I'm getting the following error: 我正在使用Firebase和Maps API构建一个Android应用程序,但出现以下错误:

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 12.0.1. 请通过更新google-services插件的版本来解决版本冲突(有关最新版本的信息, 访问https://bintray.com/android/android-tools/com.google.gms.google-services/ )或将com.google.android.gms的版本更新为12.0.1。

Here's what I have in the build.gradle module:app file. 这是我在build.gradle模块中的内容:app文件。 Any chance someone can help identify what conflict is happening here? 有人可以帮助您确定这里发生了什么冲突吗?

apply plugin: 'com.android.application'

android {
compileSdkVersion 26
buildToolsVersion '26.0.2'
defaultConfig {
    applicationId "com.simcoder.uber"
    minSdkVersion 16
    targetSdkVersion 25
    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 {
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'
})

//noinspection GradleCompatible
compile 'com.android.support:appcompat-v7:26.1.0'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
compile 'com.google.firebase:firebase-core:12.0.1'
compile 'com.google.firebase:firebase-database:11.6.0'
compile 'com.google.firebase:firebase-auth:11.6.0'
compile 'com.google.firebase:firebase-storage:11.6.0'
compile 'com.firebase:geofire-android:2.1.1'
compile 'com.google.android.gms:play-services:12.0.1'
compile 'com.github.bumptech.glide:glide:4.0.0'
compile 'com.android.support:design:26.1.0'
compile 'com.android.support:cardview-v7:26.1.0'
compile 'com.github.jd-alexander:library:1.1.0'

compile 'com.paypal.sdk:paypal-android-sdk:2.15.3'
compile 'com.google.gms:google-services:3.3.0'
testCompile 'junit:junit:4.12'
}
apply plugin: 'com.google.gms.google-services'

解决了这个问题,需要将Firebase versions更新到最新Firebase versions ,并删除了 compile 'com.google.android.gms:play-services:12.0.1'

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Android Studio org.gradle.api.GradleException - Android Studio org.gradle.api.GradleException ANDROID:org.gradle.api.GradleException:找不到满足版本约束的“org.jetbrains.kotlin:kotlin-stdlib”版本 - ANDROID: org.gradle.api.GradleException: Cannot find a version of 'org.jetbrains.kotlin:kotlin-stdlib' that satisfies the version constraints 错误:org.gradle.api.GradleException:编译错误。 有关详细信息,请参阅日志 - Error :org.gradle.api.GradleException: Compilation error. See log for more details org.gradle.api.GradleException:无法在 Android Studio 3.5.2 上读取路径和 java.nio.FileAccessDeniedException - org.gradle.api.GradleException: Could not read path and java.nio.FileAccessDeniedException on Android Studio 3.5.2 原因:org.gradle.api.GradleException:没有为 package 名称“com.faizan4742.medmobile”找到匹配的客户端 - Caused by: org.gradle.api.GradleException: No matching client found for package name 'com.faizan4742.medmobile' 由以下原因引起:org.gradle.api.GradleException:文件 google-services.json 丢失。 没有它,谷歌服务插件就不能 function - Caused by: org.gradle.api.GradleException: File google-services.json is missing. The Google Services Plugin cannot function without it gradle同步失败,出现1条警告,请通过将google-services插件的版本更新为16.0.4来解决版本冲突 - gradle sync failed with 1 warning Please fix the version conflict either by updating the version of the google-services plugin to 16.0.4 .forEach for List - org.gradle.api.GradleException: - Error: Call requires API level 24 (current min is 22): java.lang.Iterable#forEach [NewApi] - .forEach for List - org.gradle.api.GradleException: - Error: Call requires API level 24 (current min is 22): java.lang.Iterable#forEach [NewApi] 错误:“请通过更新版本来解决版本冲突...” - Error: 'Please fix the version conflict either by updating the version…' 请通过使用Firebase与Google更新我的gradle来解决版本冲突 - Please fix the version conflict with updating my gradle with Google with Firebase
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM