Google mobile ads not working after installing google play services
Hi there, I had added the Google Mobile Ads plugin (https://github.com/googleads/googleads-mobile-unity) and the google-play-services_lib to the game and it worked but when I added the Play Games for Unity (https://github.com/playgameservices/play-games-plugin-for-unity) the adds stopped working. Well, before I could test them I had to move the admob attrs, admob styles and admobs strings from the google-play-services_lib/res/values to plugins/android/googlemobileads/res/values to compile the game. Now, the play games services works properly but no adds are showed as before. In the unity console appears the log correctly as it's creating the banners but in the mobile no adds are shown. Also, I used the android sdk monitor and it looks like the plugin isn't working, there aren't logs about the GMA. I configured the test ads but neither work. What can I do?
I've found this in the Debugger:
I/Unity﹕ AndroidJavaException: java.lang.ClassNotFoundException: com.google.android.gms.ads.AdSize at UnityEngine.AndroidJNISafe.CheckException () [0x00000] in :0 at UnityEngine.AndroidJNISafe.CallStaticObjectMethod (IntPtr clazz, IntPtr methodID, UnityEngine.jvalue[] args) [0x00000] in :0 at UnityEngine.AndroidJavaObject._CallStatic[AndroidJavaObject] (System.String methodName, System.Object[] args) [0x00000] in :0 at UnityEngine.AndroidJavaObject.CallStatic[AndroidJavaObject] (System.String methodName, System.Object[] args) [0x00000] in :0 at UnityEngine.AndroidJavaObject.FindClass (System.String name) [0x00000] in :0 at UnityEngine.AndroidJavaObject._AndroidJavaObject (System.String className, System.Object[] args) [0x00000] in :0 at UnityEngine.AndroidJavaObject..ctor (System.String className, System.Object[] args) [0x00000] in :0 at GoogleMobileAds.Android.Utils.Get
Answer by LameZ · Nov 21, 2015 at 08:50 PM
if its the last build (0.9.27) it removes the directory google-play-services_lib and admob isn't working anymore ... i trying to fix this few days and still no success.
this didin't help in my case ,but you can try it anyway. https://www.bountysource.com/issues/28237470-google-play-game-service-and-admob-ads Cheers!
Damn. Well, thanks anyway, I'll try and I'll tell you if it worked :)
Answer by Atenrev · Nov 22, 2015 at 12:35 AM
IT WORKED! I love you so hard! I did what Claywilkinson said, thanks!!
yep ... btw it wors for me too , but cost me all night long :)) Cheers mate!!!
What is the actual solution for this? I am getting same error right now.