android - Error when trying to add firebase libraries to app that uses google maps API -


i have android app want add firebase messaging service functionality can receieve notifications sent self-built server firebase cloud.

i started adding configuration lines gradle files, after adding the

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

line, error follows:

error:execution failed task ':app:processdebuggoogleservices'. please fix version conflict either updating version of google-services plugin (information latest version available @ https://bintray.com/android/android-tools/com.google.gms.google-services/) or updating version of com.google.android.gms 11.0.2.

this module:app gradle script file:

apply plugin: 'com.android.application'  android {     compilesdkversion 25     buildtoolsversion "26.0.0"     defaultconfig {         applicationid "br.com.berait.brecar"         minsdkversion 21         targetsdkversion 25         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.2', {         exclude group: 'com.android.support', module: 'support-annotations'     })     compile 'com.android.support:appcompat-v7:25.3.1'     compile 'com.google.android.gms:play-services-maps:11.0.2'     compile 'com.android.support.constraint:constraint-layout:1.0.2'     compile 'com.squareup.okhttp3:okhttp:3.8.1'     compile 'com.android.support:design:25.3.1'     compile 'com.wdullaer:materialdatetimepicker:3.2.2'     compile 'pl.droidsonroids.gif:android-gif-drawable:1.2.7'     compile 'com.google.firebase:firebase-messaging:10.2.6'     testcompile 'junit:junit:4.12' } apply plugin: 'com.google.gms.google-services' 

if needed, project level gradle script file:

//top-level build file can add configuration options common sub-projects/modules.  buildscript {     repositories {         jcenter()         mavencentral()     }     dependencies {         classpath 'com.android.tools.build:gradle:2.3.3'         classpath 'com.google.gms:google-services:3.1.0'         // note: not place application dependencies here; belong         // in individual module build.gradle files     } }  allprojects {     repositories {         jcenter()         mavencentral()     } }  task clean(type: delete) {     delete rootproject.builddir } 

i have searched s.o sometime , answers type of error haven't worked me. can see, have apply plugin line @ bottom of file. believe conflict being generated

compile 'com.google.android.gms:play-services-maps:11.0.2' 

line, automatically added when added google maps api support application.

any appreciated, in advance!

bump firebase dependency version

compile 'com.google.firebase:firebase-messaging:11.0.2' 

or lower maps dependency to

compile 'com.google.android.gms:play-services-maps:10.2.6' 

Comments

Popular posts from this blog

ubuntu - PHP script to find files of certain extensions in a directory, returns populated array when run in browser, but empty array when run from terminal -

php - How can i create a user dashboard -

javascript - How to detect toggling of the fullscreen-toolbar in jQuery Mobile? -