Android Studio USB Debugging Google Play Services Out Of Date

爷,独闯天下 提交于 2019-12-13 05:48:40

问题


I'm using Android Studio 1.2 and I'm trying to run an app (that requires Google Maps) using USB Debugging. My phone is running Android 4.1.2 (API 16 - Sony Xperia T).

On Android Studio I was able to run successfully the app using Android 5.0.1 (API 21). However, using USB Debugging I get this error "Google Play Services Out Of Date, Requires 713.... but found 65...." (dots represent some numbers). My device has the latest Google Play Version.

In Android Studio under Project Structure, I've selected compile SDK version: Android 5.0.1 (API 21) and target SDK version: Android 4.1.2 (API 16).

Am I missing something? Any suggestions would be appreciated!

Thank you all!

UPDATE This is the logcat

05-05 15:20:49.436    6003-6003/com.myapp.testapp D/OpenGLRenderer﹕ Enabling debug mode 0
05-05 15:20:58.546    6003-6003/com.myapp.testapp I/dalvikvm﹕ DexOpt: access denied from Lcom/google/android/gms/common/GooglePlayServicesUtil; to field Landroid/app/Notification;.extras
05-05 15:20:58.546    6003-6003/com.myapp.testapp W/dalvikvm﹕ VFY: unable to resolve instance field 16
05-05 15:20:58.546    6003-6003/com.myapp.testapp D/dalvikvm﹕ VFY: replacing opcode 0x54 at 0x00b3
05-05 15:20:58.546    6003-6003/com.myapp.testapp E/dalvikvm﹕ Could not find class 'android.app.AppOpsManager', referenced from method com.google.android.gms.common.GooglePlayServicesUtil.zza
05-05 15:20:58.546    6003-6003/com.myapp.testapp W/dalvikvm﹕ VFY: unable to resolve check-cast 25 (Landroid/app/AppOpsManager;) in Lcom/google/android/gms/common/GooglePlayServicesUtil;
05-05 15:20:58.546    6003-6003/com.myapp.testapp D/dalvikvm﹕ VFY: replacing opcode 0x1f at 0x000e
05-05 15:20:58.546    6003-6003/com.myapp.testapp I/dalvikvm﹕ Could not find method android.content.pm.PackageManager.getPackageInstaller, referenced from method com.google.android.gms.common.GooglePlayServicesUtil.zzh
05-05 15:20:58.546    6003-6003/com.myapp.testapp W/dalvikvm﹕ VFY: unable to resolve virtual method 523: Landroid/content/pm/PackageManager;.getPackageInstaller ()Landroid/content/pm/PackageInstaller;
05-05 15:20:58.546    6003-6003/com.myapp.testapp D/dalvikvm﹕ VFY: replacing opcode 0x6e at 0x000b
05-05 15:20:58.556    6003-6003/com.myapp.testapp W/GooglePlayServicesUtil﹕ Google Play services out of date.  Requires 7327000 but found 6599036

回答1:


  1. Your device should have the latest Google Play Services

  2. Your project should have the latest Google Play Services

Gradle configuration:

dependencies {
    compile 'com.google.android.gms:play-services:7.3.0'
}
  1. Use GoogleApiAvailability class to check for this on the device


来源:https://stackoverflow.com/questions/30052755/android-studio-usb-debugging-google-play-services-out-of-date

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!