79692

GOOGLE PLAY SERVICES EXCEPTION: com.google.android.gms.common.GooglePlayServicesUtil

Question:

I am trying to integrate Google Play Games into my app. It is currently working in debug mode. However, it does not seem to work in release mode. I am getting errors. I tried clean and rebuild.

<blockquote>

java.lang.RuntimeException: Unable to get provider com.google.android.gms.measurement.AppMeasurementContentProvider: java.lang.ClassNotFoundException

</blockquote>

And then this one:

<blockquote>

GOOGLE PLAY SERVICES EXCEPTION: com.google.android.gms.common.GooglePlayServicesUtil

</blockquote>

Followed by this one:

<blockquote>

There is a problem with the Google Play Services library, which is required for Android Advertising ID support. The Google Play Services library should be integrated in any app shipping in the Play Store that uses analytics or advertising.

</blockquote>

What could be wrong? I tried experimenting with Gradle, but no luck yet.

If I disable Proguard, it works! This seems to be a known issue, but not resolved yet. Any ideas?

Answer1:

The problem was that in my Gradle I was using

classpath 'com.google.gms:google-services:1.5.0-beta2'

Now I am using

classpath 'com.google.gms:google-services:1.5.0'

Answer2:

add below code in your proguard-rule.pro and try to regenerate APK

-dontwarn com.google.android.gms.** -keep class com.google.android.gms.**{ *; } -keep interface com.google.android.gms.** { *; }

Recommend

  • Firebase Analytics not working with Instant App or Normal App
  • reading data from a USB port [closed]
  • Android gms.google.services version (15.0.1) conflict with Firebase Core 16.0.0
  • Check if values of datetime column in df2 is within datateime values of df1 in R
  • com.google.android.gms.internal.measurement is missing in Google Play Services 15.0.0 and greater
  • Measuring broadcast message latency using system clock, good idea?
  • How to pass string and dictionary in NUnit test cases?
  • Found com.google.android.gms:play-services-places:9.2.1, but version 9.0.2 is needed for the google-
  • Errno::ECONNREFUSED No connection could be made because
  • How do you compute the XOR Remainder used in CRC?
  • Is it possible to embed the sidebar with Google Maps?
  • Why is the following two duplicate finder algorithms have different time complexity?
  • Xamarin - is there a way to notify Xamarin.Forms from a native project?
  • google-maps-sdk-ios - arm 7/iphone 5 issues for Google Maps 1.4.3 for iOS
  • Watir::Exception::MissingWayOfFindingObjectException: invalid attribute: :css
  • Google Places API - Get more than 10 photos from Details Response?
  • jQuery: replace() or wrap() http://name.tld/request_url?parameter with …?
  • Problem in Loading xml from specified url using javascript in FF & Google Chrome
  • How to get google-services.json from Developer console?
  • android duplicate provider authority on apps that don't have provider
  • Making Cross Site Asynchronous HTTP Post from GWT Client
  • Connecting Google Cloud SQL with Wordpress on Google Compute Engine
  • Cassandra NoClassDefFoundError: com/google/common/util/concurrent/AsyncFunction
  • WARNING:root:Some characters could not be decoded, and were replaced with REPLACEMENT CHARACTER. Wit
  • How to create two column output from a single column
  • mave 3.2 not able to access local nexus instance return 502 code
  • google maps autocomplete bounces back already cleared text …odd…odd…odd
  • Google Maps api v3 get start and end coordinates of a street
  • Clear fused location provider's location for testing
  • Update Google Maps traffic layer without page reloading
  • Trying to get the char code of ENTER key
  • Android Studio 1.3 RC3. Google Play services out of date. Requires 7571000 but found 6774470
  • android google indoor map
  • Android Google Maps API v2 start navigation
  • Insert new calendar with SyncAdapter- Calendar API Android
  • How can I enlarge video fullscreen without the affected interface project in as3?
  • Seeking advice on Jetty HttpClient Hang
  • Google cloud sdk not working when python points python3
  • using HTMLImports.whenReady not working in chrome
  • Android Heatmap on canvas or ImageView