2016-09-29 4 views
0

latest tutorial from google에 따라 프로젝트에서 푸시 알림을 구현했습니다.Android GCM MeasurementBrokerService가 너무 많은 메모리를 사용합니다

내 앱에는 2 개의 백그라운드 서비스가 실행 중입니다. 내 응용 프로그램이 차지 RAM 메모리로 볼 때

, 나는 (예를 들어)를 참조 :
이 - 전체 메모리가 117 메가
을 사용 - 응용 프로그램에서 사용하는 메모리 13 메가
- 구글 플레이 서비스 (com.google.android.gms) - 104 Mb (!).
아래에 쓰여졌습니다. MeasurementBrokerService 서비스가 사용 중입니다.

내가 뭘 잘못하고 있니?
푸시 알림에 너무 많은 메모리가 필요한 이유는 무엇입니까? 이 MeasurementBrokerService는 무엇입니까? 사용 중지 할 수 있습니까? 당신이 시도 할 수

답변

1

, 당신의 AndroidManifest를의 시작에

이 줄을 추가 : XMLNS : 도구 = "http://schemas.android.com/tools"

<?xml version="1.0" encoding="utf-8"?> 
<manifest xmlns:android="http://schemas.android.com/apk/res/android" 
    package="cl.datacomputer.alejandrob.example" 
    xmlns:tools="http://schemas.android.com/tools"> 

과의 내부를

<application 
    android:name="android.support.multidex.MultiDexApplication" 
    android:allowBackup="true" 
    android:icon="@mipmap/ic_launcher" 
    android:label="@string/app_name" 
    android:supportsRtl="true" 
    android:theme="@style/AppTheme" 
    android:screenOrientation="portrait"> 

    <service android:name="com.google.android.gms.measurement.AppMeasurementService" 
     tools:replace="android:enabled" 
     android:enabled="false" 
     android:exported="false"/> 

그것은 내가 아는 좋은 해결책, 아니다,하지만 당신은 메모리 누수의 원인이되는 서비스를 비활성화 할 수 있습니다 : 응용 프로그램이 서비스 태그를 추가합니다.

죄송합니다. 영어가 잘못되었습니다.

감사합니다.

알레한드로 부르 고스. 여기

+0

위대한 해킹 솔루션은 매력처럼 작동합니다. 감사!! –

+0

그것은 아무것도 아니었다 :) –

관련 문제