1

Here is my gradle.app

apply plugin: 'com.android.application'

android {
    compileSdkVersion 25
    buildToolsVersion "25.0.0"

    packagingOptions {
        exclude 'META-INF/LICENSE'
        exclude 'META-INF/NOTICE'
        exclude 'META-INF/NOTICE.txt'
    }

    defaultConfig {
        applicationId "com.example.joshpc.bluetoothattendee"
        minSdkVersion 19
        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(include: ['*.jar'], dir: 'libs')
    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.0.0'
    compile 'com.google.android.gms:play-services-gcm:9.8.0'
    compile 'com.google.gms:google-services:3.0.0'
    compile 'com.google.firebase:firebase-auth:9.8.0'
    compile 'com.google.firebase:firebase-core:9.8.0'
    compile 'com.firebase:firebase-client-android:2.5.2'
    testCompile 'junit:junit:4.12'
}
apply plugin: 'com.google.gms.google-services'

When I try to run my android emulator it is giving me this read out:

W/GooglePlayServicesUtil: Google Play services out of date.  Requires 9877000 but found 9875480

I have tried reverting firebase and google play services to 9.6.0 which does not work as firebase requires 9.8.0

I have updated my API 25 android system images in the stand alone SDK manager.

My google play repository is up to date.

if I change my gradle to call for play services 9.8.7 it gives me the error:

enter image description here

And if i downgrade GPS to 9.6.0, I get this:

W/DynamiteModule: Local module descriptor class for com.google.firebase.auth not found.

So i'm not quite sure how to go about fixing this issue or updating the play services when the SDK says its up to date and I can't revert the version required. note that the "install repository and sync" isnt clickable/doesnt link to anything. I checked the repository version and its up to date

I checked the version in my emulator and it is running 9.8.75

OneCricketeer
  • 179,855
  • 19
  • 132
  • 245
ThePeskyWabbit
  • 417
  • 1
  • 7
  • 23

2 Answers2

0

If you want to run on the emulator you have configured with a system image that contains version 9875480 of the Google APIs, your only option is to downgrade the versions of Google Play Service and Firebase APIs:

dependencies {
    compile fileTree(include: ['*.jar'], dir: 'libs')
    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.0.0'
    compile 'com.google.android.gms:play-services-gcm:9.6.1'
    //compile 'com.google.gms:google-services:3.0.0'
    compile 'com.google.firebase:firebase-auth:9.6.1'
    compile 'com.google.firebase:firebase-core:9.6.1'
    //compile 'com.firebase:firebase-client-android:2.5.2'
    testCompile 'junit:junit:4.12'
}

Although you say you did this and still get the same warning, I question that. I am able to build with these dependencies and run on an emulator with version 9875480 of the Google APIs.

If you want to build with version 9.8.0, I think you need to run on a real device. I don't think any emulator images have been released that support 9.8.0, at least not for API 25.

Bob Snyder
  • 37,759
  • 6
  • 111
  • 158
-1

just change this line :compile 'com.google.android.gms:play-services-gcm:9.8.0' to:

compile 'com.google.android.gms:play-services-gcm:9.6.0'

and every thing should work well

and for the firebase try this : compile 'com.google.firebase:firebase-auth:9.6.1' compile 'com.google.firebase:firebase-core:9.6.1'

Salim Lachdhaf
  • 1,073
  • 1
  • 9
  • 21