Google Play服务已过期。需要9877000,但找到9875470 [英] Google Play services out of date. Requires 9877000 but found 9875470

查看:652
本文介绍了Google Play服务已过期。需要9877000,但找到9875470的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是我的gradle.app

  apply plugin:'com.android.application'

android {
compileSdkVersion 25
buildToolsVersion25.0.0

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

defaultConfig {
applicationIdcom.example.joshpc.bluetoothattendee
minSdkVersion 19
targetSdkVersion 25
versionCode 1
versionName1.0
testInstrumentationRunnerandroid.support.test.runner.AndroidJUnitRunner
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'),'proguard-rules.pro'
}
}
}

依赖项{
编译fileTree(包括:''.jar'],dir:'libs')
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2',{
exclude group:'com.android.support',module:'support-annotations'
} )
compile'c​​om.android.support:appcompat-v7:25.0.0'
compile'c​​om.google.android.gms:play-services-gcm:9.8.0'
compile 'com.google.gms:google-services:3.0.0'
compile'c​​om.google.firebase:firebase-auth:9.8.0'
compile'c​​om.google.firebase:firebase-core :9.8.0'
compile'c​​om.firebase:firebase-client-android:2.5.2'
testCompile'junit:junit:4.12'
}
apply plugin:' com.google.gms.google-services'

当我尝试运行我的android模拟器时,我读了:

  W / GooglePlayServicesUtil:Google Play服务已过期。需要9877000,但找到9875480 

我试着将Firebase和Google Play服务恢复到9.6.0,作为firebase需要9.8.0



我已经在独立的SDK管理器中更新了我的API 25 Android系统映像。



我的谷歌播放存储库是最新的。



如果我改变我的gradle来调用播放服务9.8 .7它给了我错误:



如果我把GPS降级到9.6.0,我得到这个:

$ $ p $ W $ DynamiteModule com.google的本地模块描述符类找不到.firebase.auth。

所以我不太清楚如何解决这个问题或更新播放服务SDK说它是最新的,我不能恢复所需的版本。
请注意,安装存储库和同步不是可点击/不连接任何东西。我检查了版本库和它的最新版本



我检查了我的模拟器版本,它运行的是9.8.75


 依赖项{
编译fileTree(包括:''.jar'],dir:' libs')
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2',{
exclude group:'com.android.support',module:'support- annotations'
})
compile'c​​om.android.support:appcompat-v7:25.0.0'
compile'c​​om.google.android.gms:play-services-gcm:9.6。 1'
// compile'c​​om.google.gms:google-services:3.0.0'
compile'c​​om.google.firebase:firebase-auth:9.6.1'
compile' com.google.firebase:火base-core:9.6.1'
// compile'c​​om.firebase:firebase-client-android:2.5.2'
testCompile'junit:junit:4.12'
}

虽然你说你做了这个,但仍然得到相同的警告,我质疑这一点。我可以使用这些依赖关系进行构建,并在Google API 9875480版本的模拟器上运行。

需要在真实的设备上运行。我不认为任何模拟器的图像已经发布,支持9.8.0,至少不是API 25。


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:

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

解决方案

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.

这篇关于Google Play服务已过期。需要9877000,但找到9875470的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆