Google AdMob java.lang.NoClassDefFoundError: com.google.android.gms.ads.AdView

Google Play Services requires an update to the most recent version by August 1st, but errors still keep recurring, even with the sample apps they provide. Set it up about 100 times by following their instructions exactly, and the same thing. Over and over .... even with their sample apps!

Could not find class 'com.google.android.gms.ads.AdView', link from com.google.android.gms.samples.ads.BannerCodeActivity.onCreate "method:" java.lang.NoClassDefFoundError: com.google.android .gms.ads.AdView

It's been 3 days now and there hasn't been any progress. Hoping it was their fault and they fixed it (for example, the google play service demos a few weeks ago were only half updated to compile with google play services).

But if anyone is using Google Play Services with the latest version and sees a problem ... let me know. It seems to be a link error but I played around it all the time

+3


source to share


1 answer


I had the same problem and tried almost every possible solution on stackoverflow and almost the whole internet, but couldn't find a solution anywhere. But somehow I realized that there are some warnings in my project that say "duplicate Android support in projects". The posts say that the support libraries in my project and in the project, the libraries I am using in my project have different versions of the support libraries.

So, I tried to solve this problem as removing the support library in my own project and voila! "Various versions of android support library" and "NoClassDefFoundError com.google.android.gms.ads.AdView" are gone! So my advice is to check the Android console and logs if there are any warnings or errors in the project.



The goolge_play_services-lib project should only be included in your project with andorid parameters inside properties. You don't have to add jars from outside. Also be sure to use the latest google game services library. I hope this helps you, because I just worked for almost 2 days on this issue to solve,

Sincerely.

0


source







All Articles