0

Я создал очень базовое приложение для работы с картой Android после установки Android Studio и установки всех необходимых SDK для своей платформы, сервисов Google Play и репозитория Google из диспетчера SDK. Но когда я запускаю приложение, независимо от уровня API, установленного для моего устройства, я получаю сообщение «SampleApplication не запускается, если вы не обновляете сервисы Google Play» с кнопкой «Обновить», как только запускается эмулятор. Нажатие на кнопку обновления происходит сбой приложения, и я вижу это в журналах:Сбой приложений на карте Android на эмуляторе

08-20 13:07:35.225 1768-1768/? D/dalvikvm? Not late-enabling CheckJNI (already on) 08-20 13:07:35.565  
1768-1768/example.com.sampleMapApp E/Trace? error opening trace file: No such file or directory (2) 08-20 13:07:35.875  
1768-1768/example.com.sampleMapApp I/dalvikvm? Could not find method android.app.Notification$Builder.setLocalOnly, 
referenced from method com.google.android.gms.common.GooglePlayServicesUtil.zza 08-20 13:07:35.875  
1768-1768/example.com.sampleMapApp W/dalvikvm? VFY: unable to resolve virtual method 242: 
Landroid/app/Notification$Builder;.setLocalOnly (Z)Landroid/app/Notification$Builder; 08-20 13:07:35.875  
1768-1768/example.com.sampleMapApp D/dalvikvm? VFY: replacing opcode 0x6e at 0x00c2 08-20 13:07:35.885  
1768-1768/example.com.sampleMapApp I/dalvikvm? DexOpt: access denied from Lcom/google/android/gms/common/GooglePlayServicesUtil; 
to field Landroid/app/Notification;.extras 08-20 13:07:35.885  
1768-1768/example.com.sampleMapApp W/dalvikvm? VFY: unable to resolve instance field 18 08-20 13:07:35.885  
1768-1768/example.com.sampleMapApp D/dalvikvm? VFY: replacing opcode 0x54 at 0x00e1 08-20 13:07:35.895  
1768-1768/example.com.sampleMapApp E/dalvikvm? Could not find class 'android.app.AppOpsManager', 
referenced from method com.google.android.gms.common.GooglePlayServicesUtil.zza 08-20 13:07:35.895  
1768-1768/example.com.sampleMapApp W/dalvikvm? VFY: unable to resolve check-cast 25 (Landroid/app/AppOpsManager;) 
in Lcom/google/android/gms/common/GooglePlayServicesUtil; 08-20 13:07:35.895  
1768-1768/example.com.sampleMapApp D/dalvikvm? VFY: replacing opcode 0x1f at 0x000e 08-20 13:07:35.905  
1768-1768/example.com.sampleMapApp I/dalvikvm? Could not find method android.content.pm.PackageManager.getPackageInstaller, 
referenced from method com.google.android.gms.common.GooglePlayServicesUtil.zzh 08-20 13:07:35.905  
1768-1768/example.com.sampleMapApp W/dalvikvm? VFY: unable to resolve virtual method 532: 
Landroid/content/pm/PackageManager;.getPackageInstaller()Landroid/content/pm/PackageInstaller; 08-20 13:07:35.905  
1768-1768/example.com.sampleMapApp D/dalvikvm? VFY: replacing opcode 0x6e at 0x000b 08-20 13:07:35.935  
1768-1768/example.com.sampleMapApp W/GooglePlayServicesUtil? Google Play services out of date. 
Requires 7571000 but found 3136130 08-20 13:07:35.946 1768-1768/example.com.sampleMapApp W/GooglePlayServicesUtil? Google Play services out of date. 
Requires 7571000 but found 3136130 08-20 13:07:35.955 1768-1768/example.com.sampleMapApp W/GooglePlayServicesUtil? Google Play services out of date. 
Requires 7571000 but found 3136130 08-20 13:07:35.965 1768-1768/example.com.sampleMapApp W/GooglePlayServicesUtil? Google Play services out of date. 
Requires 7571000 but found 3136130 08-20 13:07:35.975 1768-1768/example.com.sampleMapApp W/GooglePlayServicesUtil? Google Play services out of date. 
Requires 7571000 but found 3136130 08-20 13:07:35.985 1768-1768/example.com.sampleMapApp W/GooglePlayServicesUtil? Google Play services out of date. 
Requires 7571000 but found 3136130 08-20 13:07:36.005 1768-1768/example.com.sampleMapApp W/GooglePlayServicesUtil? Google Play services out of date. 
Requires 7571000 but found 3136130 08-20 13:07:36.015 1768-1768/example.com.sampleMapApp W/GooglePlayServicesUtil? Google Play services out of date. 
Requires 7571000 but found 3136130 08-20 13:07:36.035 1768-1768/example.com.sampleMapApp W/GooglePlayServicesUtil? Google Play services out of date. 
Requires 7571000 but found 3136130 08-20 13:07:36.085 1768-1768/example.com.sampleMapApp W/GooglePlayServicesUtil? Google Play services out of date. 
Requires 7571000 but found 3136130 08-20 13:07:36.106 1768-1768/example.com.sampleMapApp W/GooglePlayServicesUtil? Google Play services out of date. 
Requires 7571000 but found 3136130 08-20 13:07:36.135 1768-1768/example.com.sampleMapApp W/GooglePlayServicesUtil? Google Play services out of date. 
Requires 7571000 but found 3136130 08-20 13:07:36.156 1768-1768/example.com.sampleMapApp W/GooglePlayServicesUtil? Google Play services out of date. 
Requires 7571000 but found 3136130 08-20 13:07:36.185 1768-1768/example.com.sampleMapApp W/GooglePlayServicesUtil? Google Play services out of date. 
Requires 7571000 but found 3136130 08-20 13:07:36.205 1768-1768/example.com.sampleMapApp W/GooglePlayServicesUtil? Google Play services out of date. 
Requires 7571000 but found 3136130 08-20 13:07:36.355 1768-1768/example.com.sampleMapApp D/libEGL? loaded /system/lib/egl/libEGL_emulation.so 08-20 13:07:36.355  
1768-1768/example.com.sampleMapApp D/libEGL? loaded /system/lib/egl/libGLESv1_CM_emulation.so 08-20 13:07:36.376  
1768-1768/example.com.sampleMapApp D/libEGL? loaded /system/lib/egl/libGLESv2_emulation.so 08-20 13:07:36.396  
1768-1772/example.com.sampleMapApp D/dalvikvm? GC_CONCURRENT freed 259K, 12% free 2510K/2832K, paused 12ms+3ms, total 141ms 08-20 13:07:36.405 
1768-1768/example.com.sampleMapApp D/? HostConnection::get() New Host Connection established 0x2a139d08, tid 1768 08-20 13:07:36.515  
1768-1768/example.com.sampleMapApp W/EGL_emulation? eglSurfaceAttrib not implemented 08-20 13:07:36.556  
1768-1768/example.com.sampleMapApp D/OpenGLRenderer? Enabling debug mode 0 08-20 13:08:57.456  
1768-1768/example.com.sampleMapApp D/AndroidRuntime? Shutting down VM 08-20 13:08:57.456  
1768-1768/example.com.sampleMapApp W/dalvikvm? threadid=1: thread exiting with uncaught exception (group=0x40a71930) 08-20 13:08:57.496  
1768-1768/example.com.sampleMapApp E/AndroidRuntime? FATAL EXCEPTION: main 
    android.content.ActivityNotFoundException: No Activity found to handle Intent { act=android.intent.action.VIEW dat=market://details?id=com.google.android.gms flg=0x80000 pkg=com.android.vending } 
      at android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:1622) 
      at android.app.Instrumentation.execStartActivity(Instrumentation.java:1417) 
      at android.app.Activity.startActivityForResult(Activity.java:3370) 
      at android.app.Activity.startActivityForResult(Activity.java:3331) 
      at android.support.v4.app.FragmentActivity.startActivityForResult(FragmentActivity.java:820) 
      at android.app.Activity.startActivity(Activity.java:3566) 
      at android.app.Activity.startActivity(Activity.java:3534) 
      at com.google.android.gms.dynamic.zza$5.onClick(Unknown Source) 
      at android.view.View.performClick(View.java:4204) 
      at android.view.View$PerformClick.run(View.java:17355) 
      at android.os.Handler.handleCallback(Handler.java:725) 
      at android.os.Handler.dispatchMessage(Handler.java:92) 
      at android.os.Looper.loop(Looper.java:137) 
      at android.app.ActivityThread.main(ActivityThread.java:5041) 
      at java.lang.reflect.Method.invokeNative(Native Method) 
      at java.lang.reflect.Method.invoke(Method.java:511) 
      at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793) 
      at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560) 
      at dalvik.system.NativeStart.main(Native Method) 08-20 13:09:00.516 1768-1768/? I/Process? Sending signal. PID: 1768 SIG: 9" 

After seeing this ("Google Play services out of date. Requires 7571000 but found 3136130") in the log, 
I have tried installing the Google play services apk com.google.android.gms-v7.5.74 by using the terminal's "adb install" command to no avail. 

Пожалуйста, помогите мне узнать, что мне не хватает.

PS: Я искал много других связанных вопросов по этому поводу, но они все более или менее указывают на то, что сервисы Google Play не могут быть установлены.

ответ

1

Ваша ошибка ясно говорит

1768-1768/example.com.sampleMapApp W/GooglePlayServicesUtil? Google Play services out of date. 

Перейти к SDK управлять и обновлять API Google и создать новый эмулятор.

+0

Спасибо, я думаю, что я уже пробовал это. Я еще раз проверю. –

0

Я могу решить проблему, выбрав «Lollipop 22 x86 Google API» для своего эмулятора. До этого я использовал Lollipop 22 x86_64 Android 5.1.1 для своей цели. Добавление Google API в цель и обновление всех ожидающих обновлений для моего SDK разрешило это для меня. Редактировать: Также было много других SDK для разных вкусов Android-андроида, которые мне пришлось очистить и только сохранить уровни API 19 и выше для этого.