title: Fatal Exception: java.lang.NoSuchMethodError in com.google.android.gms.common.api.internal.BackgroundDetector.readCurrentStateIfPossible
body: <p>I got lots of this on Android 4.0.4 where <code>android.app.ActivityManager.getMyMemoryState</code> is missing method.</p>
  
  <p>And full stack trace is:</p>
  
  <pre><code>Fatal Exception: java.lang.NoSuchMethodError: android.app.ActivityManager.getMyMemoryState
         at com.google.android.gms.common.api.internal.BackgroundDetector.readCurrentStateIfPossible(Unknown Source:17)
         at com.google.android.gms.common.api.internal.GoogleApiManager.handleMessage(Unknown Source:169)
         at android.os.Handler.dispatchMessage(Handler.java:95)
         at com.google.android.gms.internal.base.zap.dispatchMessage(Unknown Source:8)
         at android.os.Looper.loop(Looper.java:154)
         at android.os.HandlerThread.run(HandlerThread.java:65
  </code></pre>
  
  <p>My gms related dependencies is:</p>
  
  <pre><code>implementation 'com.google.android.gms:play-services-base:16.1.0'
  implementation 'com.google.android.gms:play-services-auth:16.0.1'
  implementation 'com.google.android.gms:play-services-games:16.0.0'
  </code></pre>
  
  <p>+ firebase:</p>
  
  <pre><code>implementation 'com.google.firebase:firebase-core:16.0.7'
  implementation 'com.google.firebase:firebase-perf:16.2.3'
  implementation 'com.google.firebase:firebase-ads:17.1.3'
  </code></pre>
  
  <p>Which seem to be up to date (at time of writing)</p>
  
  <p>Is there anything I can do to prevent those crashes?</p>