AndroidJavaException: java.lang.ClassNotFoundException: com.google.android.gms.analytics.GoogleAnalytics

Hello,

Working on getting the latest Google Analytics and Google Play Games working together.

I have imported the packages and they work, however when I run the game, adb gives me this error I/Unity (21628): Initializing Google Analytics 0.2.I/Unity (21628):I/Uni - Pastebin.com.

This error exists it seems like because plugins/android/google-play-services_lib folder is empty, the setup options for Google Analytics creates this folder and the Google Play Games removes everything when doing the Android setup.

Basically I believe Google Analytics is looking for files that Google Play Games removes and replaces with the .aar ones. How can I point Google Analytics to look for these files instead?

Let me know what information I need to provide and I will provide it asap.

I should add I seem to not have play-services-analytics-8.4.0, which might be the problem, but nothing provides it.

I worked around this issue by copying play-services-analytics-8.4.0.aar from {android-sdk}\extras\google\m2repository\com\google\android\gms\play-services-analytics\8.4.0 to Assets/Plugins/Android folder.

There’s still no “official” way to fix this from Google. Their packages aren’t playing together properly. However, if you edit GooglePlayGames/Editor/GPGSDependancies.cs you can add a line in the function that will prevent Google Play Games from deleting the analytics aar file.

I’ve added this to mine to make it “stick” inside the GPGSDependencies method.

svcSupport.DependOn("com.google.android.gms",
	"play-services-analytics", PluginVersion.PlayServicesVersionConstraint);

I am finding this error while invoking facebook banner ad.
01/17 11:43:45.952 13249 13299 Error Unity: AndroidJavaException: java.lang.IllegalArgumentException: adSize