【问题标题】:Google Play services Adds up additional process and causes additional memory consumptionGoogle Play 服务会增加额外的进程并导致额外的内存消耗
【发布时间】:2016-03-31 10:52:05
【问题描述】:

我在一个应用程序中使用 google GCM,它工作正常,但问题是它添加了额外的进程(参见 Screenpic Shows 2 process),名为 Google Play 服务 (com.google.android.gms) 消耗大约 20MB,应用使用量加起来为 28MB

问题 Screenshot of the App Settings View

注意:我没有在 AndroidManifest.xml

中的任何地方使用 android:process

即使关闭应用后仍然显示 1 个服务和 2 个进程

附加过程从何而来?在多个设备中测试 (奇巧,棒棒糖)

   <receiver android:name=".gcm.services.simple.GcmBroadcastReceiver"  android:permission="com.google.android.c2dm.permission.SEND"    android:exported="true">
        <intent-filter>
            <action android:name="com.google.android.c2dm.intent.RECEIVE" />
            <action android:name="android.net.conn.CONNECTIVITY_CHANGE" />
            <action android:name="android.intent.action.BOOT_COMPLETED" />
            <action android:name="android.intent.action.MY_PACKAGE_REPLACED" />
            <action android:name="android.intent.action.QUICKBOOT_POWERON" />
            <category android:name="com.tempapp" />
        </intent-filter>
    </receiver>
    <service android:name=".gcm.services.simple.GcmIntentService" />
    <service android:name=".gcm.services.listeners.InstanceIDListener" android:exported="false">
        <intent-filter>
            <action android:name="com.google.android.gms.iid.InstanceID" />
        </intent-filter>
    </service>

Gradle:

模块级别

  compile 'com.google.android.gms:play-services-appindexing:8.4.0'
  compile 'com.google.android.gms:play-services-gcm:8.4.0'

项目级别

classpath 'com.android.tools.build:gradle:2.1.0-alpha4'
classpath 'com.google.gms:google-services:2.0.0-alpha6'

【问题讨论】:

  • @CommonsWare 你能帮忙解决这个问题吗?

标签: android google-cloud-messaging gcmlistenerservice


【解决方案1】:

您的应用可能不是唯一在您的手机上使用 Google Play 服务的应用。超过一半的应用程序使用 GPS,它可能就是其中之一。我觉得这没什么好担心的。

【讨论】:

  • 很抱歉只用 GCM,没问题
  • 您的应用可能只使用 gcm。但您手机上的其他应用可能正在使用其他 GPS 服务。
  • 对不起,我无法获取您,也许是其他应用程序,但为什么 Google Play 服务 命名进程附加到我的进程并消耗更多内存,我的旧应用程序仅使用 gcm 消耗 8mb跨度>
  • @MickyC002 你曾经在你的问题上取得突破吗?看到同样的问题,但 Google Play 服务占用了超过 100mb。
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 2019-03-07
  • 2022-10-02
  • 1970-01-01
  • 2013-10-26
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多