mmc
mmc

Reputation: 13

Android - problems with new AdMob implementation

I am trying to replace old adMob implementation with the new Google Play Services AdMob version. Unfortunately on some devices (with Android 4.0, 4.1) get following error:

*FATAL EXCEPTION: main
E/AndroidRuntime(5280): java.lang.RuntimeException: Unable to start activity ComponentInfo: android.view.InflateException: Binary XML file line #14: **Error inflating class com.google.ads.AdView***

As you see, the problem is with com.google.ads.AdView but I am replaced this with com.google.android.gms.ads then no more using this old ads library mentioned in this error. I am sure that all code is replaced with the new gms library properties (in Manifest, XML, imports and invoking method).

Due my tests even removed all ads and libraries calls from my app but the problem still exist. This app (and new ads) working properly on some devices (with Android 2.3.5 and 4.4.3) and in emulators but not working on devices with Android 4.0 or 4.1.

I am using Eclipse.

Thank you for any help.

Upvotes: 1

Views: 177

Answers (1)

Codo
Codo

Reputation: 79033

With Google Play Services, the package name of the Ad classes have changed. Instead of com.google.ads, it's now com.google.android.gms.ads.

So if you change this in your layout, it should work.

Upvotes: 2

Related Questions