Incompatibility of firebase version with google services

Asked

Viewed 210 times

0

Error:(40, 0) All firebase Libraries must be either above or Below 14.0.0

The error comes down to this. I have tried to solve it in many ways. I have never found a solution. The mistakes were changing and more and more they appeared, so I decided to go back to the beginning.

Meu Gradle:

buildscript {
    repositories {
        jcenter()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:2.3.0'
        classpath 'com.google.gms:google-services:3.2.0'
        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

allprojects {
    repositories {
        jcenter()
    }
}

task clean(type: Delete) {
    delete rootProject.buildDir
}

And my Gradle app (where you’re showing the bug):

apply plugin: 'com.android.application'

android {
    compileSdkVersion 25
    buildToolsVersion "25.0.3"
    defaultConfig {
        applicationId "com.example.sesi2018.sevenfuel"
        minSdkVersion 16
        targetSdkVersion 25
        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 {
    compile 'com.google.firebase:firebase-core:15.0.0' //(sei que aqui tem erro pelo fato de ser 15.0.0 e lá em baixo ser de outras versões... mas como disse anteriormente eu voltei do início pois cada vez mais os erros apareciam)
    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'
    })

    compile 'com.android.support:appcompat-v7:25.3.1'
    compile 'com.android.support.constraint:constraint-layout:1.0.2'
    compile 'com.google.android.gms:play-services-maps:10.2.+'
    compile 'com.android.support:multidex:1.0.0'
    compile 'com.google.firebase:firebase-core:10.2.+'
    compile 'com.google.firebase:firebase-auth:10.2.+'
    compile 'com.google.firebase:firebase-database:10.2.+'
    testCompile 'junit:junit:4.12'
}

apply plugin: 'com.google.gms.google-services'

1 answer

0

You are using a very old version of Firebase and Google Play Services. Update your dependencies in the app’s Gradle:

compile 'com.google.android.gms:play-services-maps:15.0.0'
compile 'com.android.support:multidex:1.0.0'
compile 'com.google.firebase:firebase-core:15.0.0'
compile 'com.google.firebase:firebase-auth:15.0.0'
compile 'com.google.firebase:firebase-database:15.0.0'

Browser other questions tagged

You are not signed in. Login or sign up in order to post.