playgameservices / play-games-plugin-for-unity

Google Play Games plugin for Unity
Other
3.47k stars 966 forks source link

Play Services & Appodeal #1687

Closed CallManyCZ closed 7 years ago

CallManyCZ commented 7 years ago

Hi, I'm using this plugin for a mobile game and I want there ads, so I decided to add Appodeal. First I've imported Appodeal and than GPS. But,when I finish the Import they show two errors that I couldn't find any solution.

Assets/PlayServicesResolver/Editor/IResolver.cs(74,27): error CS0433: The imported type `Google.JarResolver.PlayServicesSupport' is defined multiple times

Assets/PlayServicesResolver/Editor/PlayServicesResolver.cs(146,56): error CS0433: The imported type `Google.JarResolver.Dependency' is defined multiple times

Someone here to help me please? Thank you..

0xSwego commented 7 years ago

This is the answer they gave me from the Appodeal support center (still have to test it, had to clean my project and reinstall GPGS, but the version 0.9.37 gave me heavy headaches. I just solved going back to the v0.9.36 of GPGS and now I'll test the Appodeal thing) :

Hi. Sorry for a long delay. To handle that you need to try this:

Google.VersionHandler.InvokeInstanceMethod( svcSupport, "DependOn", new object[] { "com.google.android.gms", "play-services-ads", "LATEST" }, namedArgs: new Dictionary<string, object>() { {"packageIds", new string[] { "extra-google-m2repository" } } }); Google.VersionHandler.InvokeInstanceMethod( svcSupport, "DependOn", new object[] { "com.google.android.gms", "play-services-location", "LATEST" }, namedArgs: new Dictionary<string, object>() { {"packageIds", new string[] { "extra-google-m2repository" } } });

claywilkinson commented 7 years ago

You can manually remove multiple versions of the JarResolver when importing multiple plugins. I recommend using the most latest jar resolver version.