Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

updating the version of com.google.android.gms to 15.0.2 [duplicate]

I have updated my Firebase SDK version. But theres error of updating the version of com.google.android.gms to 15.0.2. I tried to make firebase and google services of same version but it wont work.

Dependencies

dependencies {
implementation 'com.google.firebase:firebase-messaging:15.0.2'
implementation 'com.android.support:design:26.1.0'
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'com.google.firebase:firebase-ads:15.0.1'
androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2', {
    exclude group: 'com.android.support', module: 'support-annotations'
})
implementation 'com.android.support:appcompat-v7:26.1.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.0'
implementation 'org.parceler:parceler-api:1.1.9'
annotationProcessor 'org.parceler:parceler:1.1.9'
implementation 'com.google.code.gson:gson:2.8.2'
implementation 'com.squareup.retrofit2:retrofit:2.3.0'
implementation 'com.squareup.retrofit2:converter-gson:2.3.0'
implementation 'io.reactivex:rxjava:1.2.3'
implementation 'io.reactivex:rxandroid:1.2.1'
implementation 'com.jakewharton.rxbinding:rxbinding:1.0.0'
implementation 'com.squareup.retrofit2:adapter-rxjava:2.1.0'
androidTestImplementation 'com.google.code.findbugs:jsr305:3.0.1'
implementation 'com.squareup.okhttp3:logging-interceptor:3.2.0'
implementation 'com.jakewharton:butterknife:8.8.1'
annotationProcessor 'com.jakewharton:butterknife-compiler:8.8.1'
debugCompile 'com.squareup.leakcanary:leakcanary-android:1.5.4'
releaseCompile 'com.squareup.leakcanary:leakcanary-android-no-op:1.5.4'
implementation 'com.google.dagger:dagger-android:2.11'
implementation 'com.google.dagger:dagger-android-support:2.11'
// if you use the support libraries
annotationProcessor 'com.google.dagger:dagger-android-processor:2.11'
annotationProcessor 'com.google.dagger:dagger-compiler:2.13'
implementation 'com.google.auto.value:auto-value:1.5.2'
implementation 'com.jakewharton.timber:timber:4.1.2'
implementation 'org.greenrobot:eventbus:3.0.0'
testImplementation 'junit:junit:4.12'
implementation 'com.twitter.sdk.android:twitter:3.1.1'
implementation 'com.android.support:recyclerview-v7:26.1.0'
implementation 'com.android.support:recyclerview-v7:26.1.0'
implementation 'com.simplecityapps:recyclerview-fastscroll:1.0.16'
implementation 'com.google.android.gms:play-services-location:15.0.1'
implementation 'com.android.support:cardview-v7:26.1.0'
implementation project(':linkedin-sdk')
implementation 'com.azoft.carousellayoutmanager:carousel:1.2.1'
implementation 'com.android.support:multidex:1.0.2'
implementation 'gun0912.ted:tedpermission:2.1.0'
implementation project(':libphonenumber-5.9')
implementation 'com.facebook.android:facebook-login:4.30.0'
implementation 'com.anjlab.android.iab.v3:library:1.0.44'
implementation 'com.github.bumptech.glide:glide:3.8.0'
implementation 'com.android.support:exifinterface:26.1.0'
}
like image 849
Ashutosh Shrestha Avatar asked May 03 '18 09:05

Ashutosh Shrestha


People also ask

What is the latest version of Google services plugin for Android?

com.google.android.gms:play-services-tasks:17.2.1 For more information, see the Firebase Android SDK Release Notes. An updated version of the google-services plugin for Android (v4.3.5) is now available. For more information, see the Firebase Android SDK Release Notes.

What version of Google Play services do I need to upgrade?

If you receive the error 'Found com.google.android.gms:play-services-auth:8.3.0, but version 8.1.0 is needed' when using the google-services plugin, please upgrade your google-services plugin to 1.5.0-beta2 or later. Highlights from the Google Play services 8.1 release.

What are the different versions of Google services?

com.google.gms:google-services:4.0.2 com.google.gms:google-services:4.0.1 com.google.gms:google-services:4.0.0 com.google.gms:google-services:3.3.1 com.google.gms:google-services:3.3.0

Why is Google Play no longer using version ranges?

The use of version ranges was a mistake and has been corrected; Google Play services and Firebase dependencies will no longer use version ranges. However, existing, published library POM files already contain ranges.


3 Answers

Try Below Code:

1.build.gradle(gradle)

change :

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

To :

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

follow below link:

https://stackoverflow.com/a/50152496/6920195

like image 134
Rohan Lodhi Avatar answered Oct 08 '22 09:10

Rohan Lodhi


For anyone checking this, the main reason you get this conflict issue is because you are using an older version of Android Studio.

You need to do the following:

Upgrade Android Studio to version 3.1

add:

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

to the (Top-level) build.gradle file, then you will be able to use the newest versions.

Check the below for more information:

Announcing the new SDK Versioning

Compilation failed to complete:Program type already present: com.google.android.gms.internal.measurement.zzabn

like image 23
Peter Haddad Avatar answered Oct 08 '22 08:10

Peter Haddad


A device running Android 4.0 (Ice Cream Sandwich) or newer, and Google Play services 15.0.0 or higher

If you want to use 15.0.2 then

  • Use Latest gms version.
  • Upgrade Android Studio Version.

DEMO

 dependencies {
        classpath 'com.android.tools.build:gradle:3.1.2'
        classpath 'com.google.gms:google-services:3.3.0' 
    }

Read Firebase Android Release Notes.

FYI

Latest SDK versions

Firebase Core     com.google.firebase:firebase-core:15.0.2
Ads               com.google.firebase:firebase-ads:15.0.0
Analytics         com.google.firebase:firebase-analytics:15.0.2
App Indexing      com.google.firebase:firebase-appindexing:15.0.0
Authentication    com.google.firebase:firebase-auth:15.1.0
Cloud Firestore   com.google.firebase:firebase-firestore:16.0.0
Cloud Functions   com.google.firebase:firebase-functions:15.0.0
Cloud Messaging   com.google.firebase:firebase-messaging:15.0.2

After change Clean-Rebuild-Run.

NOTE

If the same problem coming then DOWNGRADLE your version. Use 12.0.1.

like image 3
IntelliJ Amiya Avatar answered Oct 08 '22 09:10

IntelliJ Amiya