摇篮设置未同步

我已经更改了我的gradle设置,但是却收到一条错误消息,指出存在版本冲突,但是代码中没有错误

错误:


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


产品级别build.gradle:


// Top-level build file where you can add configuration options common to all 

sub-projects/modules.


buildscript {

repositories {

    jcenter()

    google()

}

dependencies {

    classpath 'com.android.tools.build:gradle:3.0.0'


    // NOTE: Do not place your application dependencies here; they belong

    // in the individual module build.gradle files



    classpath 'com.google.gms:google-services:3.1.2'

}

}


allprojects {

repositories {

    jcenter()

    mavenCentral()

    maven { url 'https://maven.google.com' }

    google()

}

}


task clean(type: Delete) {

delete rootProject.buildDir

}


回首忆惘然
浏览 136回答 2
2回答

慕田峪4524236

试试这个implementation 'com.google.firebase:firebase-core:16.0.1'implementation 'com.google.firebase:firebase-database:16.0.1'implementation 'com.google.firebase:firebase-auth:11.8.0'implementation 'com.google.firebase:firebase-storage:11.8.0'变成implementation 'com.google.firebase:firebase-core:16.0.1'implementation 'com.google.firebase:firebase-database:16.0.1'implementation 'com.google.firebase:firebase-auth:16.0.1'implementation 'com.google.firebase:firebase-storage:16.0.1'

繁花不似锦

在项目级别的build.gradle中,将Google服务版本从更改3.1.2为4.0.0
打开App,查看更多内容
随时随地看视频慕课网APP

相关分类

Java