1

Android studio show this what is the problem? i include this file compile 'com.google.android.gms:play-services-ads:11.0.4' but it also shows this. whats the matter?

08-12 08:56:52.773 22268-22319/? W/Ads: Invoke Firebase method getInstance error. java.lang.ClassNotFoundException: Didn't find class "com.google.android.gms.measurement.AppMeasurement" on path: DexPathList[[zip file "/data/app/com.orangehostbd.bpl-1/base.apk",

6
  • what are you using firebase for notifications or storage and please post your logcat error code Commented Aug 12, 2017 at 11:26
  • If you are using Firebase for notifications then to initialize fire base you have to do something like this FirebaseMessaging.getInstance().subscribeToTopic(Config.TOPIC_GLOBAL); But do not forget to use services and files related to Firebase services Commented Aug 12, 2017 at 11:30
  • i am not using firebase for notifications. i just use admob ad. ad perfectly show but log cat show this massage. Commented Aug 12, 2017 at 11:33
  • //Add this in OnCreate of Activity to initialize the ad MobileAds.initialize(getApplicationContext(), "< your-ad-unit-Id >"); try this Commented Aug 12, 2017 at 11:38
  • Are you seeing this with release and debug builds? If release only, are you using ProGuard? Commented Aug 13, 2017 at 11:24

2 Answers 2

1

There is a bug in Google Play Service. Here is the link to Google Group: https://groups.google.com/forum/#!search/appMeasurement/google-admob-ads-sdk/9Cukd02En9o/ELCZfzjUCQAJ It should be fixed if one of the next release

Sign up to request clarification or add additional context in comments.

1 Comment

5 years and 11 versions later, here I am with the same log warning
0

Had the same issue today, and adding this to the Proguard/R8 rules fixed it:

-keep class com.google.android.gms.measurement.AppMeasurement {public *; }

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.