我有一个应用程序,可以在地图上显示用户位置。它在物理Nexus One 上的API16,19,21,23和API10上工作正常,但是当我在Genymotion API10模拟器上运行它时,模拟器在我调用时重新启动
.sidebar.sidebar-popular {
z-index: -1;
}
(此帖子底部的完整示例活动类)
模拟器在没有任何预先通知的情况下重新启动,这是日志的输出:
mMap.setMyLocationEnabled(true);
有什么方法可以阻止这种情况发生吗?我显然已经在模拟器上安装了Google Play服务和谷歌地图,而且谷歌地图应用似乎工作得很好,这真的很奇怪。
修改
导致模拟器重新启动的完整示例活动:
05-26 20:36:02.944 14384-14441/com.google.android.gms.persistent E/LocationManager: locationCallbackFinished: RemoteException
android.os.DeadObjectException
at android.os.BinderProxy.transact(Native Method)
at android.location.ILocationManager$Stub$Proxy.locationCallbackFinished(ILocationManager.java:763)
at android.location.LocationManager$ListenerTransport._handleMessage(LocationManager.java:244)
at android.location.LocationManager$ListenerTransport.access$000(LocationManager.java:160)
at android.location.LocationManager$ListenerTransport$2.handleMessage(LocationManager.java:183)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:130)
at android.os.HandlerThread.run(HandlerThread.java:60)
05-26 20:36:02.944 14384-14441/com.google.android.gms.persistent E/LocationManager: locationCallbackFinished: RemoteException
android.os.DeadObjectException
at android.os.BinderProxy.transact(Native Method)
at android.location.ILocationManager$Stub$Proxy.locationCallbackFinished(ILocationManager.java:763)
at android.location.LocationManager$ListenerTransport._handleMessage(LocationManager.java:244)
at android.location.LocationManager$ListenerTransport.access$000(LocationManager.java:160)
at android.location.LocationManager$ListenerTransport$2.handleMessage(LocationManager.java:183)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:130)
at android.os.HandlerThread.run(HandlerThread.java:60)
05-26 20:36:02.944 14384-14441/com.google.android.gms.persistent E/LocationManager: locationCallbackFinished: RemoteException
android.os.DeadObjectException
at android.os.BinderProxy.transact(Native Method)
at android.location.ILocationManager$Stub$Proxy.locationCallbackFinished(ILocationManager.java:763)
at android.location.LocationManager$ListenerTransport._handleMessage(LocationManager.java:244)
at android.location.LocationManager$ListenerTransport.access$000(LocationManager.java:160)
at android.location.LocationManager$ListenerTransport$2.handleMessage(LocationManager.java:183)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:130)
at android.os.HandlerThread.run(HandlerThread.java:60)
05-26 20:36:02.952 123-123/? E/installd: eof
05-26 20:36:02.952 123-123/? E/installd: failed to read size
05-26 20:36:03.092 14223-14223/com.google.process.gapps E/AndroidRuntime: FATAL EXCEPTION: main
java.lang.RuntimeException: Package manager has died
at android.app.ContextImpl$ApplicationPackageManager.getApplicationInfo(ContextImpl.java:1841)
at odk.b(SourceFile:159)
at ocv.a(SourceFile:826)
at ocw.handleMessage(SourceFile:13053)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:130)
at android.app.ActivityThread.main(ActivityThread.java:3683)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:507)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
at dalvik.system.NativeStart.main(Native Method)
Caused by: android.os.DeadObjectException
at android.os.BinderProxy.transact(Native Method)
at android.content.pm.IPackageManager$Stub$Proxy.getApplicationInfo(IPackageManager.java:1264)
at android.app.ContextImpl$ApplicationPackageManager.getApplicationInfo(ContextImpl.java:1836)
at odk.b(SourceFile:159)
at ocv.a(SourceFile:826)
at ocw.handleMessage(SourceFile:13053)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:130)
at android.app.ActivityThread.main(ActivityThread.java:3683)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:507)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
at dalvik.system.NativeStart.main(Native Method)
05-26 20:36:03.096 14468-14842/com.google.android.gms E/ActivityThread: Failed to find provider info for com.google.android.gsf.gservices
05-26 20:36:03.104 14468-14842/com.google.android.gms E/ActivityThread: Failed to find provider info for com.google.android.gsf.gservices
05-26 20:36:03.104 14468-14842/com.google.android.gms E/ActivityThread: Failed to find provider info for com.google.android.gsf.gservices
05-26 20:36:03.112 14223-14223/? E/AndroidRuntime: Error reporting crash
android.os.DeadObjectException
at android.os.BinderProxy.transact(Native Method)
at android.app.ActivityManagerProxy.handleApplicationCrash(ActivityManagerNative.java:2547)
at com.android.internal.os.RuntimeInit$UncaughtHandler.uncaughtException(RuntimeInit.java:76)
at ilq.uncaughtException(SourceFile:118)
at ils.uncaughtException(SourceFile:54)
at ilm.uncaughtException(SourceFile:63)
at java.lang.ThreadGroup.uncaughtException(ThreadGroup.java:854)
at java.lang.ThreadGroup.uncaughtException(ThreadGroup.java:851)
at dalvik.system.NativeStart.main(Native Method)
05-26 20:36:03.128 14468-14842/com.google.android.gms E/ActivityThread: Failed to find provider info for com.google.android.gsf.gservices
05-26 20:36:03.128 14468-14842/com.google.android.gms E/ActivityThread: Failed to find provider info for com.google.android.gsf.gservices
05-26 20:36:03.128 14468-14842/com.google.android.gms E/AndroidRuntime: FATAL EXCEPTION: SyncAdapterThread-1
java.lang.RuntimeException: android.os.DeadObjectException
at android.accounts.AccountManager.getAccountsByType(AccountManager.java:394)
at smx.b(SourceFile:114)
at tat.a(SourceFile:40)
at ssg.a(SourceFile:447)
at ssg.a(SourceFile:189)
at ssg.a(SourceFile:91)
at jcj.onPerformSync(SourceFile:98)
at android.content.AbstractThreadedSyncAdapter$SyncThread.run(AbstractThreadedSyncAdapter.java:164)
Caused by: android.os.DeadObjectException
at android.os.BinderProxy.transact(Native Method)
at android.accounts.IAccountManager$Stub$Proxy.getAccounts(IAccountManager.java:474)
at android.accounts.AccountManager.getAccountsByType(AccountManager.java:391)
at smx.b(SourceFile:114)
at tat.a(SourceFile:40)
at ssg.a(SourceFile:447)
at ssg.a(SourceFile:189)
at ssg.a(SourceFile:91)
at jcj.onPerformSync(SourceFile:98)
at android.content.AbstractThreadedSyncAdapter$SyncThread.run(AbstractThreadedSyncAdapter.java:164)
05-26 20:36:03.128 14468-14842/com.google.android.gms E/AndroidRuntime: Error reporting crash
android.os.DeadObjectException
at android.os.BinderProxy.transact(Native Method)
at android.app.ActivityManagerProxy.handleApplicationCrash(ActivityManagerNative.java:2547)
at com.android.internal.os.RuntimeInit$UncaughtHandler.uncaughtException(RuntimeInit.java:76)
at ilq.uncaughtException(SourceFile:118)
at ils.uncaughtException(SourceFile:54)
at ilm.uncaughtException(SourceFile:63)
at java.lang.ThreadGroup.uncaughtException(ThreadGroup.java:854)
at java.lang.ThreadGroup.uncaughtException(ThreadGroup.java:851)
05-26 20:36:03.472 14873-14947/se.miun.mawi1402.bathingsites E/Surface: Surface (identity=11) requestBuffer(1, 0, 0, 4, 00000200) returned a buffer with a null handle
05-26 20:36:03.472 14873-14947/se.miun.mawi1402.bathingsites E/Surface: getBufferLocked(1, 0, 0, 4, 00000200) failed (Out of memory)
05-26 20:36:03.472 14873-14947/se.miun.mawi1402.bathingsites E/EGL_emulation: tid 14947: swapBuffers(322): error 0x3003 (EGL_BAD_ALLOC)
05-26 20:36:03.512 14384-14441/com.google.android.gms.persistent E/LocationManager: removeUpdates: DeadObjectException
android.os.DeadObjectException
at android.os.BinderProxy.transact(Native Method)
at android.location.ILocationManager$Stub$Proxy.removeUpdates(ILocationManager.java:692)
at android.location.LocationManager.removeUpdates(LocationManager.java:872)
at adka.a(SourceFile:79)
at acpn.b(SourceFile:196)
at acpk.a(SourceFile:123)
at acpo.a(SourceFile:133)
at acpk.a(SourceFile:100)
at acpv.f(SourceFile:46)
at acpi.a(SourceFile:62)
at acpv.f(SourceFile:46)
at acmw.a(SourceFile:10191)
at acmq.a(SourceFile:10117)
at ackx.a(SourceFile:95)
at acna.a(SourceFile:204)
at acoz.b(SourceFile:352)
at acoz.a(SourceFile:235)
at acof.a(SourceFile:144)
at acpd.handleMessage(SourceFile:100)
at android.os.Handler.dispatchMessage(Handler.java:99)
at adkk.dispatchMessage(SourceFile:50)
at android.os.Looper.loop(Looper.java:130)
at android.os.HandlerThread.run(HandlerThread.java:60)
05-26 20:36:03.512 14384-14441/com.google.android.gms.persistent E/LocationManager: RemoteException in unregisterGpsStatusListener:
android.os.DeadObjectException
at android.os.BinderProxy.transact(Native Method)
at android.location.ILocationManager$Stub$Proxy.removeGpsStatusListener(ILocationManager.java:746)
at android.location.LocationManager.removeGpsStatusListener(LocationManager.java:1342)
at adjw.a(SourceFile:89)
at acpk.a(SourceFile:7063)
at acpv.f(SourceFile:46)
at acpi.a(SourceFile:62)
at acpv.f(SourceFile:46)
at acmw.a(SourceFile:10191)
at acmq.a(SourceFile:10117)
at ackx.a(SourceFile:95)
at acna.a(SourceFile:204)
at acoz.b(SourceFile:352)
at acoz.a(SourceFile:235)
at acof.a(SourceFile:144)
at acpd.handleMessage(SourceFile:100)
at android.os.Handler.dispatchMessage(Handler.java:99)
at adkk.dispatchMessage(SourceFile:50)
at android.os.Looper.loop(Looper.java:130)
at android.os.HandlerThread.run(HandlerThread.java:60)
05-26 20:36:03.692 14217-14217/com.android.systemui E/InputQueue-JNI: channel 'b6660528 StatusBar (client)' ~ Publisher closed input channel or an error occurred. events=0x8
05-26 20:36:03.692 14217-14217/com.android.systemui E/InputQueue-JNI: channel 'b67f7ad0 TrackingView (client)' ~ Publisher closed input channel or an error occurred. events=0x8
05-26 20:36:03.692 14217-14217/com.android.systemui E/InputQueue-JNI: channel 'b6949638 StatusBarExpanded (client)' ~ Publisher closed input channel or an error occurred. events=0x8
05-26 20:36:03.692 14218-14218/com.android.launcher E/InputQueue-JNI: channel 'b6804400 com.android.launcher/com.android.launcher2.Launcher (client)' ~ Publisher closed input channel or an error occurred. events=0x8
05-26 20:36:03.744 127-127/? E/local_gps: Can't send RMC command
05-26 20:36:03.892 14961-14961/? E/ALSALib: external/alsa_lib/src/control/control.c:902:(snd_ctl_open_noupdate) Invalid CTL AndroidOut
05-26 20:36:03.892 14961-14961/? E/ALSALib: external/alsa_lib/src/control/control.c:902:(snd_ctl_open_noupdate) Invalid CTL AndroidIn
05-26 20:36:03.896 14961-14961/? E/ALSALib: external/alsa_lib/src/pcm/pcm.c:2210:(snd_pcm_open_noupdate) Unknown PCM AndroidPlayback_Speaker_normal
05-26 20:36:03.896 14961-14961/? E/ALSALib: external/alsa_lib/src/pcm/pcm.c:2210:(snd_pcm_open_noupdate) Unknown PCM AndroidPlayback_Speaker
05-26 20:36:03.896 14961-14961/? E/ALSALib: external/alsa_lib/src/pcm/pcm.c:2210:(snd_pcm_open_noupdate) Unknown PCM AndroidPlayback