首页 > 解决方案 > My app gets killed due to Service App update

问题描述

I see in the logcat that the app google play services "com.google.android.gms" gets updated.

Therefore the activity manager kills all applications which use the play services even if they are in the foreground.

I/ActivityManager( 2076): Force stopping com.google.android.gms appid=10008 user=-1: installPackageLI
I/ActivityManager( 2076): Killing 4051:com.google.android.youtube/u0a68 (adj 902): stop com.google.android.gms
I/ActivityManager( 2076): Killing 2883:com.google.android.gms.persistent/u0a8 (adj 100): stop com.google.android.gms
W/ActivityManager( 2076): Scheduling restart of crashed service com.google.android.gms/.common.stats.GmsCoreStatsService in 1000ms
W/ActivityManager( 2076): Scheduling restart of crashed service com.google.android.gms/.backup.BackupTransportService in 10993ms
...
I/ActivityManager( 2076): Killing 9409:com.android.vending/u0a26 (adj 200): stop com.google.android.gms
D/ConnectivityService( 2076): ConnectivityService NetworkRequestInfo binderDied(NetworkRequest [ LISTEN id=8, [ Capabilities: INTERNET&NOT_RESTRICTED&TRUSTED&FOREGROUND] ], android.os.BinderProxy@a87ac95)
W/PackageManager( 2076): Trying to update system app code path from /data/app/com.google.android.gms-1 to /data/app/com.google.android.gms-2
W/PackageManager( 2076): Package com.google.android.gms desires unavailable shared library com.google.android.ble; ignoring!
W/PackageManager( 2076): Package com.google.android.gms desires unavailable shared library com.google.android.wearable; ignoring!
E/ConnectivityService( 2076): RemoteException caught trying to send a callback msg for NetworkRequest [ LISTEN id=8, [ Capabilities: INTERNET&NOT_RESTRICTED&TRUSTED&FOREGROUND] ]
W/PackageManager( 2076): Code path for com.google.android.gms changing from /data/app/com.google.android.gms-1 to /data/app/com.google.android.gms-2
W/PackageManager( 2076): Resource path for com.google.android.gms changing from /data/app/com.google.android.gms-1 to /data/app/com.google.android.gms-2
I/ActivityManager( 2076): Killing 2903:com.google.android.googlequicksearchbox:search/u0a27 (adj 500): stop com.google.android.gms
W/ActivityManager( 2076): Scheduling restart of crashed service com.google.android.googlequicksearchbox/com.google.android.apps.gsa.search.core.service.SearchService in 200950ms
I/ActivityManager( 2076): Killing 3711:com.google.android.gms.unstable/u0a8 (adj 900): stop com.google.android.gms
I/ActivityManager( 2076): Killing 3873:com.google.android.gms.ui/u0a8 (adj 904): stop com.google.android.gms
I/ActivityManager( 2076): Killing 2895:com.google.android.apps.maps/u0a64 (adj 902): stop com.google.android.gms
I/ActivityManager( 2076): Killing 3127:com.google.android.gms/u0a8 (adj 100): stop com.google.android.gms
W/ActivityManager( 2076): Scheduling restart of crashed service com.google.android.gms/.measurement.service.MeasurementBrokerService in 60945ms
W/ActivityManager( 2076): Scheduling restart of crashed service com.google.android.gms/.chimera.GmsBoundBrokerService in 210945ms

I/ActivityManager( 2076): Killing 9632:com.example.app/1000 (adj 0): stop com.google.android.gms
W/ActivityManager( 2076): Force removing ActivityRecord{7ea5f8a u0 com.example.app/.MyActivity t33}: app died, no saved state

My app "com.example.app" gets killed last.

Avoid update of depending app

Is it possible to avoid this update during my app is in foreground. It shouldn't happen often but still is not that nice regarding the user experience.

Avoid update of foreground app Is it possible to avoid the automatic playstore update of an app while it is in foreground. This happens quite often to android users. I hate when I am reading the newspaper and the newspaper app gets updated then.

Similar, does not answer my question

Android/Google Play - Can an App Update While it Is Running

标签: androidandroid-activityupdateslifecycle

解决方案


谷歌报告说他们不会解决这个问题,尽管他们也不会真正承认他们不会:https ://issuetracker.google.com/issues/174418227


推荐阅读