实施插页式广告; Google Play已过期。更新模拟器?

时间:2015-05-12 01:51:02

标签: java android android-emulator ads interstitial

相当于标题所说的内容。我试图实施广告,但它只是不会出现。 logcat表示该广告甚至正在加载,它只是不会在屏幕上显示。我想我已经在sdk管理器中下载了所有内容,gradle play服务适用于7.0.0,模拟器有x86 google API运行 - 它可能是以某种其他需要更新的方式关闭的模拟器?如果这是问题,我只是不知道如何修复模拟器。以下是遇到的错误。

W/GooglePlayServicesUtil﹕ Google Play services out of date.  Requires 7095000 but found 6774470

2 个答案:

答案 0 :(得分:0)

您必须更新设备上的Google Play Services。使用此代码提示用户他需要更新应用程序。

int status = GooglePlayServicesUtil.isGooglePlayServicesAvailable( getApplicationContext() );
if(status == ConnectionResult.SUCCESS) {
    //alarm to go and install Google Play Services
}else if(status == ConnectionResult.SERVICE_VERSION_UPDATE_REQUIRED){
   Toast.makeText(context,"please udpate your google play service",Toast.LENGTH_SHORT).show
}

答案 1 :(得分:0)

最简单的事情如下:

1)安装Genimotion  a)使用它,https://www.genymotion.com/它很直接  b)进一步设置说明:http://tleyden.github.io/blog/2013/11/22/android-studio-plus-genymotion-emulator/

2)将Google Play服务添加到Genimotion。 This thread做得很好。