0

When updating google library version from 9.6.0 to 11.8.0 it creates so many issue, I am not able to compile the code.

Please see the below module Gradle file dependencies

compile 'com.android.support:appcompat-v7:26.0.2'
compile 'com.android.support:support-v4:27.0.1'
compile 'com.android.support:support-v13:27.0.1'
compile 'com.android.support:design:27.0.1'
compile 'com.android.support:cardview-v7:27.0.1'
compile 'com.android.support:recyclerview-v7:27.0.1'
compile 'com.android.support:customtabs:27.0.1'

//noinspection GradleCompatible
compile 'com.google.android.gms:play-services-analytics:11.8.0'
compile 'com.google.android.gms:play-services-maps:11.8.0'
compile 'com.google.android.gms:play-services-location:11.8.0'
compile 'com.google.firebase:firebase-crash:11.0.4'
compile 'com.google.firebase:firebase-messaging:11.0.4'
compile 'com.google.firebase:firebase-core:11.0.4'

and below is the project gradle depenmdencies

  dependencies {
//        classpath 'com.android.tools.build:gradle:2.0.0-rc1'
//        classpath 'com.google.firebase:firebase-plugins:1.1.1'
        classpath 'com.google.firebase:firebase-plugins:1.1.5'
        classpath 'com.android.tools.build:gradle:3.1.0-alpha06'
        classpath 'com.google.gms:google-services:3.1.0'
        classpath "io.realm:realm-gradle-plugin:3.0.0"
    }
Ahmad Arslan
  • 4,498
  • 8
  • 38
  • 59

1 Answers1

2

All google libraries version should have same version:

Change:

compile 'com.android.support:appcompat-v7:26.0.2'

to:

compile 'com.android.support:appcompat-v7:27.0.1'

and:

compile 'com.google.firebase:firebase-crash:11.0.4'
compile 'com.google.firebase:firebase-messaging:11.0.4'
compile 'com.google.firebase:firebase-core:11.0.4'

to:

compile 'com.google.firebase:firebase-crash:11.8.0'
compile 'com.google.firebase:firebase-messaging:11.8.0'
compile 'com.google.firebase:firebase-core:11.8.0'
Nongthonbam Tonthoi
  • 12,667
  • 7
  • 37
  • 64
  • Man you saved my life, I been fixing it from the last 2 hours :( – Ahmad Arslan Feb 21 '18 at 05:31
  • When compiling the app it throws me the issue "ProGuard configuration parser error: C:\Users\ahmars\.gradle\caches\transforms-1\files-1.1\play-services-base-11.8.0.aar" – Ahmad Arslan Feb 21 '18 at 05:33
  • @AhmadArslan it seems like there is a problem with progaurd. Check if [this](https://stackoverflow.com/questions/47893266/build-failing-on-play-services11-8-x-with-pro-guard-parser-error/47894812) helps you – Nongthonbam Tonthoi Feb 21 '18 at 05:40
  • No no its fixed I had to disabled the instant Run and build the librraies. now all working good :) – Ahmad Arslan Feb 21 '18 at 05:41