ClassNotFoundException: Didn't find class "com.google.android.gms.measurement.AppMeasurement"

5,694 views
Skip to first unread message

twelvel...@gmail.com

unread,
Aug 3, 2017, 9:19:58 AM8/3/17
to Google Mobile Ads SDK Developers
I have not integrated with firebase, but I'm getting a warning about a firebase class missing.

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.twelvelouisiana.android.trippod.electric-1/base.apk", zip file "/data/app/com.twelvelouisiana.android.trippod.electric-1/split_lib_dependencies_apk.apk", zip file "/data/app/com.twelvelouisiana.android.trippod.electric-1/split_lib_slice_0_apk.apk", zip file "/data/app/com.twelvelouisiana.android.trippod.electric-1/split_lib_slice_1_apk.apk", zip file "/data/app/com.twelvelouisiana.android.trippod.electric-1/split_lib_slice_2_apk.apk", zip file "/data/app/com.twelvelouisiana.android.trippod.electric-1/split_lib_slice_3_apk.apk", zip file "/data/app/com.twelvelouisiana.android.trippod.electric-1/split_lib_slice_4_apk.apk", zip file "/data/app/com.twelvelouisiana.android.trippod.electric-1/split_lib_slice_5_apk.apk", zip file "/data/app/com.twelvelouisiana.android.trippod.electric-1/split_lib_slice_6_apk.apk", zip file "/data/app/com.twelvelouisiana.android.trippod.electric-1/split_lib_slice_7_apk.apk", zip file "/data/app/com.twelvelouisiana.android.trippod.electric-1/split_lib_slice_8_apk.apk", zip file "/data/app/com.twelvelouisiana.android.trippod.electric-1/split_lib_slice_9_apk.apk"],nativeLibraryDirectories=[/data/app/com.twelvelouisiana.android.trippod.electric-1/lib/x86_64, /vendor/lib64, /system/lib64]]
                                                                                     at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
                                                                                     at java.lang.ClassLoader.loadClass(ClassLoader.java:511)
                                                                                     at java.lang.ClassLoader.loadClass(ClassLoader.java:469)
                                                                                     at com.google.android.gms.ads.internal.scionintegration.b.a(:com.google.android.gms.DynamiteModulesA:166)
                                                                                     at com.google.android.gms.ads.internal.scionintegration.b.a(:com.google.android.gms.DynamiteModulesA:151)
                                                                                     at com.google.android.gms.ads.internal.scionintegration.b.f(:com.google.android.gms.DynamiteModulesA:42)
                                                                                     at com.google.android.gms.ads.internal.request.c.a(:com.google.android.gms.DynamiteModulesA:26)
                                                                                     at com.google.android.gms.ads.internal.util.b.run(:com.google.android.gms.DynamiteModulesA:4)
                                                                                     at com.google.android.gms.ads.internal.util.af.call(:com.google.android.gms.DynamiteModulesA:3)
                                                                                     at com.google.android.gms.ads.internal.util.ag.run(:com.google.android.gms.DynamiteModulesA:3)
                                                                                     at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:423)
                                                                                     at java.util.concurrent.FutureTask.run(FutureTask.java:237)
                                                                                     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113)
                                                                                     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)
                                                                                     at java.lang.Thread.run(Thread.java:818)
                                                                                  Suppressed: java.lang.ClassNotFoundException: com.google.android.gms.measurement.AppMeasurement
                                                                                     at java.lang.Class.classForName(Native Method)
                                                                                     at java.lang.BootClassLoader.findClass(ClassLoader.java:781)
                                                                                     at java.lang.BootClassLoader.loadClass(ClassLoader.java:841)
                                                                                     at java.lang.ClassLoader.loadClass(ClassLoader.java:504)
                                                                                       ... 13 more
                                                                                  Caused by: java.lang.NoClassDefFoundError: Class not found using the boot class loader; no stack trace available
08-03 00:01:04.808 5898-5967/com.twelvelouisiana.android.trippod.electric W/Ads: The Google Mobile Ads SDK will not integrate with Firebase. Admob/Firbase integration requires the latest Firebase SDK jar, but Firebase SDK is either missing or out of date
dependencies {
    compile fileTree(include: ['*.jar'], dir: 'libs')
    androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
        exclude group: 'com.android.support', module: 'support-annotations'
    })
    testCompile 'junit:junit:4.12'
    compile 'com.fasterxml.jackson.core:jackson-core:2.8.4'
    compile 'com.fasterxml.jackson.core:jackson-annotations:2.8.4'
    compile 'com.fasterxml.jackson.core:jackson-databind:2.8.4'
    testCompile 'junit:junit:4.12'
    compile 'com.google.android.gms:play-services-location:11.0.4'
    compile 'com.google.android.gms:play-services-maps:11.0.4'
    compile 'com.google.android.gms:play-services-ads-lite:11.0.4'
    compile 'com.android.support:design:25.3.1'
    compile 'com.android.support:recyclerview-v7:25.3.1'
    compile 'com.android.support:cardview-v7:25.3.1'
    compile 'com.android.support:appcompat-v7:25.3.1'
    compile 'com.android.support:preference-v14:25.3.1'
}

MobileAds.initialize(getApplicationContext(), getString(R.string.banner_ad_app_id));
AdView mAdView = (AdView) findViewById(R.id.adView);
AdRequest adRequest = new AdRequest.Builder()
       
.build();
mAdView
.loadAd(adRequest);





Bharani Cherukuri (Mobile Ads SDK Team)

unread,
Aug 3, 2017, 3:00:46 PM8/3/17
to Google Mobile Ads SDK Developers
Hello, 

Thank you for contacting us. I would need some additional information to proceed further. Would you be able to provide us a sample project of your implementation where the crash is reproducible with the steps to reproduce? Also, can you provide us the complete crash logs and device logs so we can debug further? Additionally, can you confirm if you're able to replicate the crash with our sample apps by changing the dependency?

Regards,
Bharani Cherukuri
Mobile Ads SDK Team

Bharani Cherukuri (Mobile Ads SDK Team)

unread,
Aug 11, 2017, 11:46:03 AM8/11/17
to Google Mobile Ads SDK Developers
Hello, 

Following up on this thread, are you still having an issue with this? If so, please provide the information requested above and we can take a look.

Regards,
Bharani Cherukuri
Mobile Ads SDK Team

On Thursday, August 3, 2017 at 9:19:58 AM UTC-4, twelvel...@gmail.com wrote:

twelvel...@gmail.com

unread,
Aug 13, 2017, 11:58:44 AM8/13/17
to Google Mobile Ads SDK Developers
Thanks for the follow-up. I attached the logcat.

I tried the sample banner app,  but that project compiles with firebase:
compile 'com.google.firebase:firebase-ads:11.0.0'

My project compiles with ads or ads-lite:
compile 'com.google.android.gms:play-services-ads-lite:11.0.4'

I'm working on a reproducible project.

Also, it's a warning not a crash. The app doesn't crash and I still get ads.

Thank you

logcat.txt

Danish Farooqui

unread,
Aug 14, 2017, 6:41:46 AM8/14/17
to Google Mobile Ads SDK Developers
I have the same issue banner ad is showing and working but app getting crashed when i am using viewpager in activity

twelvel...@gmail.com

unread,
Aug 14, 2017, 9:49:27 AM8/14/17
to Google Mobile Ads SDK Developers
I reproduced the error with the BannerExample.

Steps to reproduce:
1) Remove the following line from the project build.gradle file: classpath 'com.google.gms:google-services:3.1.0'
2) Remove the following line from the end of the app build.gradle file: apply plugin: 'com.google.gms.google-services'
3) Remove the following line in the app build.gradle file: compile 'com.google.firebase:firebase-ads:11.0.0'
4) Add the following line to dependencies in the app build.gradle: compile 'com.google.android.gms:play-services-ads-lite:11.0.4'
5) Build the project.
6) Run the app on a device or emulator (I used Nexus 6 Google API 25)
7) View the logcat for the exception warning.


On Friday, August 11, 2017 at 11:46:03 AM UTC-4, Bharani Cherukuri (Mobile Ads SDK Team) wrote:

Bharani Cherukuri (Mobile Ads SDK Team)

unread,
Aug 14, 2017, 2:22:16 PM8/14/17
to Google Mobile Ads SDK Developers
Hello, 

Thank you for providing the details. I was able to reproduce the issue with these steps. Our team is working to prevent the warnings to have a clean build. Let me know if you have any issues compiling your project and loading the ads. I will be happy to assist you. 

Regards,
Bharani Cherukuri
Mobile Ads SDK Team 

On Thursday, August 3, 2017 at 9:19:58 AM UTC-4, twelvel...@gmail.com wrote:

Bharani Cherukuri (Mobile Ads SDK Team)

unread,
Aug 17, 2017, 3:24:21 PM8/17/17
to Google Mobile Ads SDK Developers
Hello, 

Thank you for your patience. This issue has been fixed and will be available in our future release. 

Regards,
Bharani Cherukuri
Mobile Ads SDK Team

On Thursday, August 3, 2017 at 9:19:58 AM UTC-4, twelvel...@gmail.com wrote:

Alexandru Filip

unread,
Aug 29, 2017, 3:56:15 AM8/29/17
to Google Mobile Ads SDK Developers
Hello,

I have the same issue but a little bit stranger. I had an account on add mobs for testing the ads from my application and is working perfectly. The problem appears when I changed the AdUnitId with the associated account for my application. I tried to changed it again with the ids from my test account and is working again... can you help me with this? I can`t publish my app because the ads are not working on the associated account for the application.

Thanks, 
Alexandru Filip

William Ferguson

unread,
Oct 1, 2017, 4:06:09 AM10/1/17
to Google Mobile Ads SDK Developers
Hi Bharani, can you please provide details on what version of the Google Play Services library this will be fixed in?

I am still seeing it in Google Play Services 11.4.0 which is the latest as of 17-SEP-2017.

William

Bharani Cherukuri (Mobile Ads SDK Team)

unread,
Oct 2, 2017, 2:36:47 PM10/2/17
to Google Mobile Ads SDK Developers
Hello William, 

Thank you for getting back to the support. This issue has been fixed on the latest version of the SDK. I was not able to reproduce the issue with our sample apps. If you're still seeing the issue, could you provide us the detailed steps to reproduce the issue with our sample apps, so we can take a look? 

Are you experiencing any issues with the ad serving or noticing any crashes? If yes, could you provide us the complete stack trace, as this will help us investigate the issue further?

Regards,
Bharani Cherukuri
Mobile Ads SDK Team 

On Thursday, August 3, 2017 at 9:19:58 AM UTC-4, twelvel...@gmail.com wrote:

William Ferguson

unread,
Oct 2, 2017, 2:55:08 PM10/2/17
to Bharani Cherukuri (Mobile Ads SDK Team), Google Mobile Ads SDK Developers
Bharani,

I'm not going to burn time attempting to reproduce it in the sample apps. 

It still occurs with 11.4.0. 

It appears to be an intermittent issue, so I suspect it depends upon something like the creative that is delivered. So perhaps you need to spend a bit more time attempting to reproduce.

I'm not noticing any obvious issues with ad serving. Nor experiencing any crashes.

William

--

---
You received this message because you are subscribed to a topic in the Google Groups "Google Mobile Ads SDK Developers" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-admob-ads-sdk/9Cukd02En9o/unsubscribe.
To unsubscribe from this group and all its topics, send an email to google-admob-ads...@googlegroups.com.
To post to this group, send email to google-adm...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Bharani Cherukuri (Mobile Ads SDK Team)

unread,
Oct 2, 2017, 3:42:00 PM10/2/17
to Google Mobile Ads SDK Developers
Hello William, 

Thank you for contacting us. We understand your concern. For us to investigate the issue, we would need steps to reproduce the issue, details about your implementation and the complete stack trace. If I could get these details, we will be able to take a look and assist you further.

Regards,
Bharani Cherukuri
Mobile Ads SDK Team

On Thursday, August 3, 2017 at 9:19:58 AM UTC-4, twelvel...@gmail.com wrote:

William Ferguson

unread,
Oct 2, 2017, 3:48:53 PM10/2/17
to Bharani Cherukuri (Mobile Ads SDK Team), Google Mobile Ads SDK Developers
Bharani, I totally understand. But my budget is burnt.
I am not doing anything unusual. I am creating and displaying a banner and occasionally an interstitial at game end. 
 
You have a full stacktrace, and you have the source code that is generating that warning.

William

Bharani Cherukuri (Mobile Ads SDK Team)

unread,
Oct 3, 2017, 1:46:31 PM10/3/17
to Google Mobile Ads SDK Developers
Hello William, 

I apologize for the confusion. This issue has been fixed but it did not make to the latest SDK release. We currently do not have an ETA for which release this fix is targeted to. Please follow our release history page for more updates.

Thanks,
Bharani Cherukuri
Mobile Ads SDK Team

On Thursday, August 3, 2017 at 9:19:58 AM UTC-4, twelvel...@gmail.com wrote:
Reply all
Reply to author
Forward
0 new messages