2
votes

I am building a native android app using android studio. so far i have used firebase and map pages for content, but i keep on getting an error. I saw similar post like mine but those where from some time ago with different versions. I am wondering if somebody knows the solution for this.

Error:

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 10.0.1.

App level build.gradle:

apply plugin: 'com.android.application'

android {
    compileSdkVersion 23
    buildToolsVersion '25.0.2'
    defaultConfig {
        applicationId "com.me.myproject"
        minSdkVersion 21
        targetSdkVersion 23
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    }
    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.1', {
        exclude group: 'com.android.support', module: 'support-annotations'
    })
    compile 'com.android.support:appcompat-v7:25.3.1'
    compile 'com.android.support:design:25.3.1'
    compile 'com.google.firebase:firebase-auth:10.0.1'
    compile 'com.android.support.constraint:constraint-layout:1.0.2'
    compile 'com.google.android.gms:play-services-maps:10.2.1'
    testCompile 'junit:junit:4.12'
}

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

Project level build.gradle:

// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
    repositories {
        jcenter()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:2.3.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.0.0'
    }
}

allprojects {
    repositories {
        jcenter()
    }
}

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

EDIT: After changing firebase and play services to the same version i get this error(see below) and i am being sent to file v24\values-v24.xml

Error:(3) Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.Button.Borderless.Colored'. Error:(4) Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.Button.Colored'. Error:(3) Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.Button.Borderless.Colored'. Error:(4) Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.Button.Colored'. Error:Execution failed for task ':app:processDebugResources'. com.android.ide.common.process.ProcessException: Failed to execute aapt

2
I think it is because firebase-auth and play-services-map have different versions. Make them same and it should fix it. - Rehan
@Rehan i tried fixing it this way but got a different error, do you know a solution for this or is this unrelated? see edit for error - Basman01
Now this is because your compileSdkVersion does not match with your support library version, I guess. Try changing compileSdkVersion from 23 to 25. If there is still some issue, please update your gradle file in the question. - Rehan
@Rehan that fixed it, gradle build finishes succesfull again. thank you - Basman01

2 Answers

2
votes

Sloppy mistake . You must use Same version .

 compile 'com.google.firebase:firebase-auth:10.2.1' //Use this instead of old .
 compile 'com.google.android.gms:play-services-maps:10.2.1'

Then Clean-Rebuild and Run .

0
votes

Cordova plugin

firebase -> src -> android -> build.gradle

change

com.google.firebase:firebase-auth:+ 

to

com.google.firebase:firebase-auth:18.0.0