Android studio 谷歌播放服务不是最新的

Android studio 谷歌播放服务不是最新的,android-studio,admob,google-play-services,Android Studio,Admob,Google Play Services,我正在尝试将google admob集成到我的android studio应用程序中。我在我的日志中收到以下消息(对于格式设置,我深表歉意,并将非常感谢任何帮助): 我假设我的google play服务出于某种原因已经过时,但我不明白为什么会这样。我在最后留下了“apply plugin:'com.google.gms.google services'” build.gradle(项目) ****build.gradle(模块:应用程序)**** 这意味着手机安装的Google play低于您在

我正在尝试将google admob集成到我的android studio应用程序中。我在我的日志中收到以下消息(对于格式设置,我深表歉意,并将非常感谢任何帮助):

我假设我的google play服务出于某种原因已经过时,但我不明白为什么会这样。我在最后留下了“apply plugin:'com.google.gms.google services'”

build.gradle(项目)

****build.gradle(模块:应用程序)****


这意味着手机安装的Google play低于您在清单中指定的版本


您需要更新手机的google play服务。

您需要更新google play服务应用程序。您可以使用获取以启动恢复进程
GoogleAppAvailability
用于验证设备上的Google Play Services APK可用且是最新的

您可能希望在运行时检查设备上的GooglePlayServices是否是最新的。如果没有,只需显示相应的错误对话框,提示用户进行更新

Integer resultCode = GooglePlayServicesUtil.isGooglePlayServicesAvailable(getActivity());
if (resultCode == ConnectionResult.SUCCESS) {
    //Do what you want
} else {
    Dialog dialog = GooglePlayServicesUtil.getErrorDialog(resultCode, getActivity(), 0);
    if (dialog != null) {
        //This dialog will help the user update to the latest GooglePlayServices
        dialog.show();
    }
}

查看文档了解更多信息:

我今天遇到了类似的问题

进入SDK管理器,在“SDK平台”选项卡下选择android 6.0。在面板右下角,单击“显示包详细信息”


现在,在6.0部分下选择“Google API”和“Google API系统映像(针对您正在使用的映像)”。选择这两个对象后,重新启动模拟器,它将随修复程序更新。

我不明白这是怎么回事,因为我是在模拟器上运行它的。@JonahLivinston使用Genymotion emulator,因为您可以在那里更新Google的播放服务。谢谢您的回复。我知道这是基本的,但如何更新Google Play服务应用程序。sdk管理器上的google play services显示它已安装,没有可用的更新,我正在模拟器上运行它(我必须在这个模拟器上进行更新吗)我运行了这段代码,这一次在emulator上打开应用程序时,它提示我更新google play服务。当我单击“更新”时,它允许我启动第一个活动,但仍然没有显示广告,我收到了关于google play服务过时的相同消息
buildscript {
    repositories {
        jcenter()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:2.1.0'
        classpath 'com.google.gms:google-services:3.0.0'


        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

allprojects {
    repositories {
        jcenter()
    }
}

task clean(type: Delete) {
    delete rootProject.buildDir
}


apply plugin: 'com.android.application'
android {
    compileSdkVersion 23
    buildToolsVersion "23.0.3"

    defaultConfig {
        applicationId "com.example.livingstonlabs.whatsbest"
        minSdkVersion 16
        targetSdkVersion 23
        versionCode 1
        versionName "1.0"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    testCompile 'junit:junit:4.12'
    compile 'com.android.support:appcompat-v7:23.4.0'
    compile 'com.google.firebase:firebase-core:9.0.0'
    compile 'com.google.firebase:firebase-database:9.0.0'
    compile 'com.google.firebase:firebase-ads:9.0.0'
    compile 'com.google.android.gms:play-services:9.0.0'


}
apply plugin: 'com.google.gms.google-services'
Integer resultCode = GooglePlayServicesUtil.isGooglePlayServicesAvailable(getActivity());
if (resultCode == ConnectionResult.SUCCESS) {
    //Do what you want
} else {
    Dialog dialog = GooglePlayServicesUtil.getErrorDialog(resultCode, getActivity(), 0);
    if (dialog != null) {
        //This dialog will help the user update to the latest GooglePlayServices
        dialog.show();
    }
}